PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bitfld-7.c
blob350e7a3672b4db8e6269445890948ae872a70736
1 /* { dg-require-effective-target int32plus } */
2 union U
4 const int a;
5 unsigned b : 24;
6 };
8 static union U u = { 0x12345678 };
10 /* Constant folding used to fail to account for endianness when folding a
11 union. */
13 int
14 main (void)
16 #ifdef __BYTE_ORDER__
17 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
18 return u.b - 0x345678;
19 #else
20 return u.b - 0x123456;
21 #endif
22 #endif
23 return 0;