1 /* PR tree-optimization/18046  */
2 /* { dg-options "-O2 -fdump-tree-vrp2-details" }  */
3 /* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp2" } }  */
4 /* In the 2nd VRP pass (after PRE) we expect to thread the default label of the
5    1st switch straight to that of the 2nd switch.  */
6 
7 extern void foo (void);
8 extern void bar (void);
9 
10 extern int i;
11 void
test(void)12 test (void)
13 {
14   switch (i)
15     {
16     case 0:
17       foo ();
18       break;
19     case 1:
20       bar ();
21       break;
22     default:
23       break;
24     }
25 
26   switch (i)
27     {
28     case 0:
29       foo ();
30       break;
31     case 1:
32       bar ();
33       break;
34     default:
35       break;
36     }
37 }
38