diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-27 18:53:36 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-27 18:53:36 +0000 |
commit | c2034a856d8389a12149a95273a1ba53d8bd28c3 (patch) | |
tree | 796445c9df0e9caa4b8e1dce2480c314d1c297fc /gcc/testsuite/gcc.dg/20030324-1.c | |
parent | e2b2fa1f2f0938c8e43e21cfa6bf39ca562b11ec (diff) | |
download | gcc-c2034a856d8389a12149a95273a1ba53d8bd28c3.tar.gz |
PR opt/10087
* gcc.dg/20030324-1.c: New test.
PR opt/10087
* loop.c (loop_givs_reduce): Skip bivs with duplicate locations
while incrementing giv.
(record_biv): Check for duplicate biv locations and
set (struct induction *) v->same if found.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64928 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20030324-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20030324-1.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20030324-1.c b/gcc/testsuite/gcc.dg/20030324-1.c new file mode 100644 index 00000000000..343c721dc64 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20030324-1.c @@ -0,0 +1,33 @@ +/* { dg-do run } */ +/* { dg-options "-O -fstrength-reduce -fstrict-aliasing -fforce-mem -fgcse" } */ + +void b(int*,int*); + +typedef struct { + double T1; + char c; +} S; + +int main(void) +{ + int i,j; + double s; + + S x1[2][2]; + S *x[2] = { x1[0], x1[1] }; + S **E = x; + + for( i=0; i < 2; i++ ) + for( j=0; j < 2; j++ ) + E[j][i].T1 = 1; + + for( i=0; i < 2; i++ ) + for( j=0; j < 2; j++ ) + s = E[j][i].T1; + + b(&j,&i); + printf( "result %.6e\n", s); + return 0; +} + +void b(int *i, int *j) {} |