PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr78170.c
blobdce8a3eee362f43216210abb20df14520ded0cd7
1 /* { dg-require-effective-target int32plus } */
3 /* PR tree-optimization/78170.
4 Check that sign-extended store to a bitfield
5 doesn't overwrite other fields. */
7 int a, b, d;
9 struct S0
11 int f0;
12 int f1;
13 int f2;
14 int f3;
15 int f4;
16 int f5:15;
17 int f6:17;
18 int f7:2;
19 int f8:30;
20 } c;
22 void fn1 ()
24 d = b = 1;
25 for (; b; b = a)
27 struct S0 e = { 0, 0, 0, 0, 0, 0, 1, 0, 1 };
28 c = e;
29 c.f6 = -1;
33 int main ()
35 fn1 ();
36 if (c.f7 != 0)
37 __builtin_abort ();
38 return 0;