diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/graphite/pr36287.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/pr36287.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/graphite/pr36287.c b/gcc/testsuite/gcc.dg/graphite/pr36287.c new file mode 100644 index 00000000000..51b77c7157d --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr36287.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-O -ftree-loop-linear" } */ + +int tab[2][2]; + +int foo () +{ + int i, j, k; + + for (i = 0; i < 2; ++i) + for (j = 0; j < 2; ++j) + for (k = 0; k < 2; ++k) + {} + + for (i = 0; i < 2; ++i) + for (j = 0; j < 2; ++j) + if (i == 0) + tab[i][j] = 0; + + return tab[0][1]; +} + |