| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O -fdump-tree-ccp1" } */ |
| 3 |
|
| 4 |
/* Check that we constant propagate &&c into the goto and remove |
| 5 |
the unreachable BBs. */ |
| 6 |
|
| 7 |
void a(int*); void b(int*); void c(int*); void d(int*); |
| 8 |
void func2(int* val) |
| 9 |
{ |
| 10 |
const void *const labels[] = { &&a, &&b, &&c, &&d }; |
| 11 |
goto *labels[2]; |
| 12 |
a: a(val); |
| 13 |
b: b(val); |
| 14 |
c: c(val); |
| 15 |
d: d(val); |
| 16 |
} |
| 17 |
|
| 18 |
/* { dg-final { scan-tree-dump-not "a \\\(" "ccp1" } } */ |
| 19 |
/* { dg-final { scan-tree-dump-not "b \\\(" "ccp1" } } */ |