* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bitfld-6.c
blobd54a7376017ba89692b8514b51dccc0d61c6a67a
1 /* { dg-skip-if "requires default endianness" { *-*-* } "-fsso-struct=*" "" } */
3 union U
5 const int a;
6 unsigned b : 20;
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 - 0x45678;
20 #else
21 return u.b - 0x12345;
22 #endif
23 #endif
24 return 0;