| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */ |
| 3 |
|
| 4 |
double pcheck; |
| 5 |
|
| 6 |
void foo(int n, int m, int b) |
| 7 |
{ |
| 8 |
int i, j; |
| 9 |
|
| 10 |
goto bb18; |
| 11 |
|
| 12 |
start: |
| 13 |
i = 1; |
| 14 |
do { |
| 15 |
j = 1; |
| 16 |
do { |
| 17 |
double x = pcheck; |
| 18 |
x = x + 1; |
| 19 |
pcheck = x; |
| 20 |
j = j + 1; |
| 21 |
} while (j != m); |
| 22 |
i = i + 1; |
| 23 |
} while (i != n); |
| 24 |
|
| 25 |
bb18: |
| 26 |
pcheck = 0.0; |
| 27 |
goto start; |
| 28 |
} |
| 29 |
|
| 30 |
/* We should have inserted two PHI nodes and the one in the i-loop |
| 31 |
should have 0.0 in the argument coming from the bb18 block. */ |
| 32 |
|
| 33 |
/* { dg-final { scan-tree-dump "New PHIs: 2" "pre" } } */ |
| 34 |
/* { dg-final { scan-tree-dump "PHI <.*0\\\.0" "pre" } } */ |