PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr79737-2.c
blob56a6ad8f663b0a578f28c3aa2cda15874a6a62cc
1 /* PR tree-optimization/79737 */
3 #if __SIZEOF_INT__ < 4
4 __extension__ typedef __INT32_TYPE__ int32_t;
5 #else
6 typedef int int32_t;
7 #endif
9 #pragma pack(1)
10 struct S
12 int32_t b:18;
13 int32_t c:1;
14 int32_t d:24;
15 int32_t e:15;
16 int32_t f:14;
17 } i, j;
19 void
20 foo ()
22 i.e = 0;
23 i.b = 5;
24 i.c = 0;
25 i.d = -5;
26 i.f = 5;
29 void
30 bar ()
32 j.b = 5;
33 j.c = 0;
34 j.d = -5;
35 j.e = 0;
36 j.f = 5;
39 int
40 main ()
42 foo ();
43 bar ();
44 asm volatile ("" : : : "memory");
45 if (i.b != j.b || i.c != j.c || i.d != j.d || i.e != j.e || i.f != j.f)
46 __builtin_abort ();