diff options
Diffstat (limited to 'testsuite/fail_compilation/aligned_attribute.elna')
| -rw-r--r-- | testsuite/fail_compilation/aligned_attribute.elna | 20 |
1 files changed, 20 insertions, 0 deletions
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. |
