1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 /* { dg-require-effective-target int32plus } */
4
5 int printf (const char *, ...);
6
7 int a, b = 1, d;
8
9 union U1
10 {
11 unsigned int f0;
12 int f1;
13 };
14
15 union U2
16 {
17 int f2;
18 int f3;
19 } c;
20
21 int
22 fn1 (int p)
23 {
24 int t = p && a || p && a && p;
25 return t ? t : a;
26 }
27
28 unsigned
29 fn2 (union U1 p1, union U2 p2)
30 {
31 if (p1.f1 <= 0)
32 {
33 for (; p2.f2;)
34 c.f2 = 0;
35 p2.f2 = fn1 (d);
36 }
37 return p2.f3;
38 }
39
40 int g = 0;
41
42 int
43 foo ()
44 {
45 if (b)
46 {
47 union U1 f = { 0xFFFFFFFFU };
48
49 fn2 (f, c);
50 }
51 g = 1;
52 return 0;
53 }
54
55
56 int
57 main ()
58 {
59 foo ();
60
61 if (g == 0)
62 __builtin_abort ();
63
64 return 0;
65 }