summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-20 08:07:17 +0000
committerabel <abel@138bc75d-0d04-0410-961f-82ee72b054a4>2010-08-20 08:07:17 +0000
commitd2e2a8963b73d654ef7f219472c47791f8d42136 (patch)
treecd82490d66705363cd96dce145f56d215adae4e5
parent913492bdf3bb5de3fa9a87f009456776dd307922 (diff)
downloadgcc-d2e2a8963b73d654ef7f219472c47791f8d42136.tar.gz
PR rtl-optimization/44691
* gfortran.dg/pr44691.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163396 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/pr44691.f41
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e46fd3f22df..be71700d26f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-19 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/44691
+ * gfortran.dg/pr44691.f: New test.
+
2010-10-19 Olivier Hainque <hainque@adacore.com>
* gcc.target/sparc/sibcall-dslot.c: New testcase.
diff --git a/gcc/testsuite/gfortran.dg/pr44691.f b/gcc/testsuite/gfortran.dg/pr44691.f
new file mode 100644
index 00000000000..dc57c44586e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr44691.f
@@ -0,0 +1,41 @@
+C PR rtl-optimization/44691
+C { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } }
+C { dg-options "-O2 -fselective-scheduling2" }
+
+ SUBROUTINE ORIEN(IW,NATOT,NTOTORB,NATORB,P,T)
+ IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+ DIMENSION NATORB(NATOT),P(NTOTORB*(NTOTORB+1)/2)
+ DIMENSION T(NTOTORB,NTOTORB)
+ DO 9000 IATOM=1,NATOT
+ ILAST = NTOTORB
+ IF (IATOM.NE.NATOT) ILAST=NATORB(IATOM+1)-1
+ DO 8000 IAOI=NATORB(IATOM),ILAST
+ DO 7000 IAOJ = IAOI+1,ILAST
+ R2 = 0.0D+00
+ R3 = 0.0D+00
+ DO 6000 INOTA=1,NATOT
+ DO 5000 IK=NATORB(INOTA),NTOTORB
+ IMAI=MAX(IK,IAOI)
+ IMII=MIN(IK,IAOI)
+ IMAJ=MAX(IK,IAOJ)
+ IMIJ=MIN(IK,IAOJ)
+ IKI=(IMAI*(IMAI-1))/2 + IMII
+ IKJ=(IMAJ*(IMAJ-1))/2 + IMIJ
+ PIKI=P(IKI)
+ PIKJ=P(IKJ)
+ R2 = R2 + (PIKI**4)-6*(PIKI*PIKI*PIKJ*PIKJ)+(PIKJ)
+ 5000 CONTINUE
+ 6000 CONTINUE
+ R2 = (R2/4.0D+00)
+ Q = SQRT(R2*R2 + R3*R3)
+ IF (Q.LT.1.0D-08) GO TO 7000
+ A = COS(THETA)
+ B = -SIN(THETA)
+ CALL ROT1INT(NTOTORB,IAOI,IAOJ,A,B,P)
+ 7000 CONTINUE
+ 8000 CONTINUE
+ 9000 CONTINUE
+ RETURN
+ END
+
+