PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr67781.c
blob71ccd6a45af4b6dbc41460596fe70749c72146ef
1 /* { dg-require-effective-target int32plus } */
2 #ifdef __UINT32_TYPE__
3 typedef __UINT32_TYPE__ uint32_t;
4 #else
5 typedef unsigned uint32_t;
6 #endif
8 #ifdef __UINT8_TYPE__
9 typedef __UINT8_TYPE__ uint8_t;
10 #else
11 typedef unsigned char uint8_t;
12 #endif
14 struct
16 uint32_t a;
17 uint8_t b;
18 } s = { 0x123456, 0x78 };
20 int pr67781()
22 uint32_t c = (s.a << 8) | s.b;
23 return c;
26 int
27 main ()
29 if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
30 return 0;
32 if (pr67781 () != 0x12345678)
33 __builtin_abort ();
34 return 0;