| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -ftree-loop-linear" } */ |
| 3 |
|
| 4 |
/* This testcase was causing an ICE in building distance vectors because |
| 5 |
we weren't ignoring the fact that one of the induction variables |
| 6 |
involved in the dependence was outside of the loop. */ |
| 7 |
extern int foo (int, int); |
| 8 |
int |
| 9 |
main (void) |
| 10 |
{ |
| 11 |
int a[50]; |
| 12 |
int b[50]; |
| 13 |
int i, j, k; |
| 14 |
for (i = 4; i < 30; i++) |
| 15 |
{ |
| 16 |
for (j = 3; j < 40; j++) |
| 17 |
{ |
| 18 |
for (k = 9; k < 50; k++) |
| 19 |
{ |
| 20 |
b[j] = a[i]; |
| 21 |
a[k] = b[i]; |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
foo (a[i], b[i]); |
| 26 |
} |