| 1 |
/* PR tree-optimization/18046 */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-ethread-details" } */ |
| 3 |
/* { dg-final { scan-tree-dump-times "Registering jump thread" 1 "ethread" } } */ |
| 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); |
| 9 |
|
| 10 |
void |
| 11 |
test (int i) |
| 12 |
{ |
| 13 |
if (i >= 7 && i <= 8) |
| 14 |
foo (); |
| 15 |
|
| 16 |
switch (i) |
| 17 |
{ |
| 18 |
case 1: |
| 19 |
bar (); |
| 20 |
break; |
| 21 |
case 7: |
| 22 |
case 8: |
| 23 |
case 9: |
| 24 |
baz (); |
| 25 |
break; |
| 26 |
} |
| 27 |
} |