diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-15 09:35:34 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-15 09:35:34 +0000 |
commit | 9d4e93164a28cc46f4907c105fff07f1d4d1768c (patch) | |
tree | 98699616c4062e9e81d2c10336ff645e90ced992 /gcc/testsuite/gcc.dg/pr29581-1.c | |
parent | 9ba2a8d41e3e577394c960ba662c401f63027dca (diff) | |
download | gcc-9d4e93164a28cc46f4907c105fff07f1d4d1768c.tar.gz |
PR tree-optimization/29581
* lambda-code.c (replace_uses_equiv_to_x_with_y): Add YINIT,
REPLACEMENTS, FIRSTBSI arguments. If initial condition or
type is different between Y and USE, create a temporary
variable, initialize it at the beginning of the body bb
and use it as replacement instead of Y.
* gcc.dg/pr29581-1.c: New test.
* gcc.dg/pr29581-2.c: New test.
* gcc.dg/pr29581-3.c: New test.
* gcc.dg/pr29581-4.c: New test.
* gfortran.dg/pr29581.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr29581-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr29581-1.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr29581-1.c b/gcc/testsuite/gcc.dg/pr29581-1.c new file mode 100644 index 00000000000..e5400735525 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr29581-1.c @@ -0,0 +1,44 @@ +/* PR tree-optimization/29581 */ +/* Origin: gcc.dg/vect/vect-85.c */ +/* { dg-do run } */ +/* { dg-options "-O2 -ftree-loop-linear" } */ + +extern void abort (void); + +#define N 16 + +int main1 (int *a) +{ + int i, j, k; + int b[N]; + + for (i = 0; i < N; i++) + { + for (j = 0; j < N; j++) + { + k = i + N; + a[j] = k; + } + b[i] = k; + } + + + for (j = 0; j < N; j++) + if (a[j] != i + N - 1) + abort(); + + for (j = 0; j < N; j++) + if (b[j] != j + N) + abort(); + + return 0; +} + +int main (void) +{ + int a[N] __attribute__ ((__aligned__(16))); + + main1 (a); + + return 0; +} |