PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp104.c
blob0a952267b29de9e567553e1665831aec917aa45e
1 /* PR tree-optimization/18046 */
2 /* { dg-options "-O2 -fdump-tree-switchlower" } */
3 /* We scan for 2 switches as the dump file reports a transformation,
4 IL really contains just a single. */
5 /* { dg-final { scan-tree-dump-times "switch" 2 "switchlower" } } */
7 void foo (void);
8 void bar (void);
9 void baz (void);
11 void
12 test (int i)
14 switch (i)
16 case 1:
17 foo ();
18 break;
19 case 2:
20 bar ();
21 break;
22 default:
23 break;
26 /* This switch should be gone after threading/VRP. */
27 switch (i)
29 case 1:
30 foo ();
31 break;
32 case 2:
33 baz ();
34 break;
35 default:
36 break;