Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / bitfield3.c
blob139f4d461606d79ed9bc9e8d75fba9e2307de62a
1 // Test for bitfield alignment in structs on IA-32
2 // { dg-do run }
3 // { dg-options "-O2" }
4 // { dg-options "-mno-align-double -mno-ms-bitfields" { target *-*-interix* } }
6 extern void abort (void);
7 extern void exit (int);
9 struct X {
10 int : 32;
13 struct Y {
14 int i : 32;
17 int main () {
18 if (__alignof__(struct X) != 1)
19 abort ();
20 if (__alignof__(struct Y) != 4)
21 abort ();
23 exit (0);