PR tree-optimization/81627
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp106.c
blobe2e48d8deb9645bddcf6d5585ac9667101f3424b
1 /* PR tree-optimization/18046 */
2 /* { dg-options "-O2 -fdump-tree-vrp1-details" } */
3 /* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" } } */
4 /* During VRP we expect to thread the true arm of the conditional through the switch
5 and to the BB that corresponds to the 7 ... 9 case label. */
6 extern void foo (void);
7 extern void bar (void);
8 extern void baz (void);
10 void
11 test (int i)
13 if (i >= 7 && i <= 8)
14 foo ();
16 switch (i)
18 case 1:
19 bar ();
20 break;
21 case 7:
22 case 8:
23 case 9:
24 baz ();
25 break;