Blame SOURCES/gcc32-rh149250.patch
|
|
4ac4fd |
2002-09-08 Jan Hubicka <jh@suse.cz>
|
|
|
4ac4fd |
|
|
|
4ac4fd |
* loop.c (loop_givs_reduce): Emit addition after.
|
|
|
4ac4fd |
|
|
|
4ac4fd |
2005-07-19 Jakub Jelinek <jakub@redhat.com>
|
|
|
4ac4fd |
|
|
|
4ac4fd |
* g77.dg/20050719-1.f: New test.
|
|
|
4ac4fd |
|
|
|
4ac4fd |
--- gcc/loop.c.jj 2003-10-06 12:15:37.000000000 +0200
|
|
|
4ac4fd |
+++ gcc/loop.c 2005-07-19 11:49:08.000000000 +0200
|
|
|
4ac4fd |
@@ -4684,7 +4684,7 @@ loop_givs_reduce (loop, bl)
|
|
|
4ac4fd |
rtx insert_before;
|
|
|
4ac4fd |
|
|
|
4ac4fd |
if (! auto_inc_opt)
|
|
|
4ac4fd |
- insert_before = tv->insn;
|
|
|
4ac4fd |
+ insert_before = NEXT_INSN (tv->insn);
|
|
|
4ac4fd |
else if (auto_inc_opt == 1)
|
|
|
4ac4fd |
insert_before = NEXT_INSN (v->insn);
|
|
|
4ac4fd |
else
|
|
|
4ac4fd |
--- gcc/testsuite/g77.dg/20050719-1.f.jj 2005-07-19 12:00:18.000000000 +0200
|
|
|
4ac4fd |
+++ gcc/testsuite/g77.dg/20050719-1.f 2005-07-19 12:01:31.000000000 +0200
|
|
|
4ac4fd |
@@ -0,0 +1,37 @@
|
|
|
4ac4fd |
+C Test for a strength reduction bug.
|
|
|
4ac4fd |
+C { dg-do run }
|
|
|
4ac4fd |
+C { dg-options "-O2 -fno-automatic" }
|
|
|
4ac4fd |
+ SUBROUTINE FOO(D)
|
|
|
4ac4fd |
+ INTEGER A,B,C,D,E,I,J,K
|
|
|
4ac4fd |
+ DIMENSION A(5,5),B(5,5),C(5,5),D(5,5)
|
|
|
4ac4fd |
+ DO I=1,5
|
|
|
4ac4fd |
+ DO J=1,5
|
|
|
4ac4fd |
+ A(I,J)=J
|
|
|
4ac4fd |
+ B(I,J)=1
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ DO I=1,5
|
|
|
4ac4fd |
+ DO J=1,5
|
|
|
4ac4fd |
+ E=0
|
|
|
4ac4fd |
+ DO K=1,5
|
|
|
4ac4fd |
+ E=E+B(I,K)*A(K,J)
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ C(I,J)=E
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ DO I=1,5
|
|
|
4ac4fd |
+ DO J=1,5
|
|
|
4ac4fd |
+ D(I,J)=C(I,J)
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ END
|
|
|
4ac4fd |
+
|
|
|
4ac4fd |
+ INTEGER D,I,J
|
|
|
4ac4fd |
+ DIMENSION D(5,5)
|
|
|
4ac4fd |
+ CALL FOO(D)
|
|
|
4ac4fd |
+ DO I=1,5
|
|
|
4ac4fd |
+ DO J=1,5
|
|
|
4ac4fd |
+ IF (D(I,J).NE.5*J) CALL ABORT
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ ENDDO
|
|
|
4ac4fd |
+ END
|