| 1 |
/* PR tree-optimization/20640 */ |
| 2 |
|
| 3 |
/* After unrolling the loop, we'd turn some conditional branches into |
| 4 |
unconditional ones, but branch redirection would fail to compute |
| 5 |
the PHI args for the PHI nodes in the replacement edge |
| 6 |
destination, so they'd remain NULL causing crashes later on. */ |
| 7 |
|
| 8 |
/* { dg-do compile } */ |
| 9 |
|
| 10 |
static int a = 0; |
| 11 |
extern int foo (void); |
| 12 |
extern int *bar (void) __attribute__ ((__const__)); |
| 13 |
|
| 14 |
void |
| 15 |
test (int x) |
| 16 |
{ |
| 17 |
int b = 10; |
| 18 |
while (foo () == -1 && *bar () == 4 && b > 0) |
| 19 |
--b; |
| 20 |
a = x; |
| 21 |
} |