From bd2b80d6ac582b9f0bcd96c86d4b79bfdb64eca1 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 11 Sep 2026 09:11:47 +0200 Subject: Implement aligned attribute --- testsuite/fail_compilation/aligned_attribute.elna | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 testsuite/fail_compilation/aligned_attribute.elna (limited to 'testsuite/fail_compilation/aligned_attribute.elna') diff --git a/testsuite/fail_compilation/aligned_attribute.elna b/testsuite/fail_compilation/aligned_attribute.elna new file mode 100644 index 0000000..3b5a56e --- /dev/null +++ b/testsuite/fail_compilation/aligned_attribute.elna @@ -0,0 +1,20 @@ +type + Uneven = record + #aligned(3) x: Word8 (* @Error Alignment must be a power of two *) + end + Twice = record + #aligned(4) #aligned(8) y: Word8 (* @Error Attribute '#aligned' specified more than once *) + end + Unknown = record + #packed(1) z: Word8 (* @Error Attribute '#packed' not declared *) + end + +proc takes(#aligned(8) p: Int) (* @Error Attribute '#aligned' is not supported in this position *) +begin +return + +program() +begin +return 0u8 + +end. -- cgit v1.2.3