1 // Test for bitfield alignment in structs on IA-32 2 // { dg-do run } 3 // { dg-require-effective-target ia32 } 4 // { dg-options "-O2 -mno-align-double -mno-ms-bitfields" } 5 6 extern void abort (void); 7 extern void exit (int); 8 9 struct X { 10 char a; 11 long long : 0; 12 char b; 13 } x; 14 main()15int main () { 16 if (&x.b - &x.a != 4) 17 abort (); 18 if (sizeof (x) != 5) 19 abort (); 20 21 exit (0); 22 } 23