* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bitfld-7.c
blob158ee2b13ebe22acb57b6bcd9ed4924c0529927c
1 /* { dg-skip-if "requires default endianness" { *-*-* } "-fsso-struct=*" "" } */
3 union U
5 const int a;
6 unsigned b : 24;
7 };
9 static union U u = { 0x12345678 };
11 /* Constant folding used to fail to account for endianness when folding a
12 union. */
14 int
15 main (void)
17 #ifdef __BYTE_ORDER__
18 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
19 return u.b - 0x345678;
20 #else
21 return u.b - 0x123456;
22 #endif
23 #endif
24 return 0;