Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp109.c
blob86299a9c59779364ae5268336b4e06f41386bb3e
1 /* { dg-options "-O2 -fdump-tree-vrp1" } */
2 /* { dg-final { scan-tree-dump "case 9 ... 10:" "vrp1" } } */
3 /* { dg-final { scan-tree-dump "case 17 ... 18:" "vrp1" } } */
4 /* { dg-final { scan-tree-dump "case 27 ... 30:" "vrp1" } } */
6 extern void foo (void);
7 extern void bar (void);
9 void
10 test1 (int i)
12 if (i != 7 && i != 8)
13 switch (i)
15 case 1:
16 case 2:
17 foo ();
18 break;
19 case 7: /* Redundant label. */
20 case 8: /* Redundant label. */
21 case 9:
22 case 10:
23 bar ();
24 break;
28 void
29 test3 (int i)
31 if (i != 19 && i != 20)
32 switch (i)
34 case 1:
35 case 2:
36 foo ();
37 break;
38 case 17:
39 case 18:
40 case 19: /* Redundant label. */
41 case 20: /* Redundant label. */
42 bar ();
43 break;
47 void
48 test2 (int i)
50 if (i != 28 && i != 29)
51 switch (i)
53 case 1:
54 case 2:
55 foo ();
56 break;
57 /* No redundancy. */
58 case 27:
59 case 28:
60 case 29:
61 case 30:
62 bar ();
63 break;