* gcc.dg/ucnid-[23456].c: XFAIL on AIX.
[official-gcc.git] / gcc / testsuite / gcc.dg / i386-bitfield2.c
blobf77a4ab409714919a59e878f3598be62f9fc61ec
1 // Test for bitfield alignment in structs on IA-32
2 // { dg-do run { target i?86-*-* } }
3 /* { dg-skip-if "" { i?86-*-* } { "-m64" } { "" } } */
4 // { dg-options "-O2" }
5 // { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-interix* i?86-*-cygwin* i?86-*-mingw* } }
7 extern void abort (void);
8 extern void exit (int);
10 struct X {
11 char a;
12 long long : 0;
13 char b;
14 } x;
16 int main () {
17 if (&x.b - &x.a != 4)
18 abort ();
19 if (sizeof (x) != 5)
20 abort ();
22 exit (0);