xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.dg/ext/align1.C (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 // Test that __attribute__ ((aligned)) is preserved.
2 // The alignment used to be 64 but Cygwin does not
3 // support an alignment greater than 16 and COFF
4 // not support an alignment greater than 4.
5 
6 extern "C" int printf (const char *, ...);
7 
8 typedef float at[4][4] __attribute__ ((aligned));
9 
10 float dummy[4][4][15];
11 
12 static volatile at a1[15];
13 
14 float f1 __attribute__ ((aligned));
15 
16 int
main(void)17 main (void)
18 {
19   printf ("%d %d\n", __alignof (a1), __alignof (f1));
20   return (__alignof (a1) < __alignof (f1));
21 }
22