PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / Wparentheses-13.c
blob9837ba566d9e2a9a3ef8e4efe50a946f60082d3c
1 /* PR c/70436 */
2 /* { dg-options "-Wparentheses" } */
4 int a, b, c;
5 void bar (int);
7 void
8 foo (void)
10 if (a) /* { dg-warning "ambiguous" } */
11 if (b)
13 if (c)
14 bar (0);
16 else
17 bar (1);
19 if (a > 0)
20 if (a > 1)
21 if (a > 2)
22 if (a > 3)
23 if (a > 4)
24 if (a > 5) /* { dg-warning "ambiguous" } */
25 if (a > 6)
26 while (1)
27 bar (0);
28 else
29 bar (1);
31 if (a) /* { dg-warning "ambiguous" } */
32 if (b)
33 switch (c);
34 else
35 bar (1);
37 switch (a)
39 default:
40 if (b) /* { dg-warning "ambiguous" } */
41 if (c)
42 for (;;)
43 bar (0);
44 else
45 bar (1);
48 if (a) /* { dg-warning "ambiguous" } */
49 if (a)
51 bar (2);
53 else
54 bar (3);
56 if (a)
57 do if (b) bar (4); while (1);
58 else bar (5);
62 if (a)
63 if (b) /* { dg-warning "ambiguous" } */
64 if (c) for (;;) bar (6);
65 else bar (7);
66 } while (0);