diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/align1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/align1.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/align1.C b/gcc/testsuite/g++.dg/ext/align1.C new file mode 100644 index 000000000..6c960c396 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/align1.C @@ -0,0 +1,21 @@ +// Test that __attribute__ ((aligned)) is preserved. +// The alignment used to be 64 but Cygwin does not +// support an alignment greater than 16 and COFF +// not support an alignment greater than 4. + +extern "C" int printf (const char *, ...); + +typedef float at[4][4] __attribute__ ((aligned)); + +float dummy[4][4][15]; + +static volatile at a1[15]; + +float f1 __attribute__ ((aligned)); + +int +main (void) +{ + printf ("%d %d\n", __alignof (a1), __alignof (f1)); + return (__alignof (a1) < __alignof (f1)); +} |