1 // Test for oversized bitfield alignment in structs on IA-32
2 // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } }
3 // { dg-options "-O2" }
4 // Cygwin and mingw default to MASK_ALIGN_DOUBLE. Override to ensure
6 // { dg-additional-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-mingw* } }
7 // As for mingw target the ms-bitfield switch is activated by default,
8 // make sure for this test that it is disabled.
9 // { dg-additional-options "-mno-ms-bitfields" { target i?86-*-mingw* } }
14 int b : 224; // { dg-warning "exceeds its type" }
42 long long n : 160; // { dg-warning "exceeds its type" }
55 if (&a.c - &a.a != 32)
59 if (sizeof (a4) != 4 * 36)
61 if (sizeof (b) != 2 * 4 + 36)
63 if (__alignof__ (b.e) != 4)
65 if (&c.i - &c.g != 12)
69 if (sizeof (c4) != 4 * 16)
71 if (sizeof (d) != 2 * 4 + 16)
73 if (__alignof__ (d.k) != 4)
75 if (&e.o - &e.m != 24)
79 if (sizeof (e4) != 4 * 28)
81 if (sizeof (f) != 2 * 4 + 28)
83 if (__alignof__ (f.q) != 4)