PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr71408.c
blobd81b813f83d05adc2a5e4fbf42ada14f6e4d41ad
1 /* PR middle-end/71408 */
2 /* { dg-do run } */
3 /* { dg-options "-Os" } */
5 #if __SIZEOF_INT__ >= 4
6 unsigned a, b;
8 struct S0
10 int f1:18;
11 unsigned f3:4;
13 #else
14 __UINT32_TYPE__ a, b;
16 struct S0
18 __INT32_TYPE__ f1:18;
19 unsigned f3:4;
21 #endif
23 void fn1 ()
25 struct S0 c = { 7, 0 };
26 if (c.f1)
27 c.f3 = 3;
28 a = -~c.f3;
29 c.f3 = ~(c.f1 && c.f1);
30 c.f1 = c.f3 * (c.f1 - (c.f1 - a % c.f1)) + ~c.f3 * -a;
31 b = ~(c.f1 & a);
32 if (b >= 4294967295)
33 __builtin_abort ();
36 int
37 main ()
39 fn1 ();
40 return 0;