aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2000-05-12 01:02:42 +0000
committerJeff Law <law@gcc.gnu.org>2000-05-11 19:02:42 -0600
commit2e8b0910d0b19fff06fff2fe09e415848a462355 (patch)
treea80a1e404c7f2e13641cf8f2690b794b349ec36b /gcc
parentf4305c31e558721d507c740cd733d1e692e4a6bb (diff)
downloadgcc-2e8b0910d0b19fff06fff2fe09e415848a462355.zip
gcc-2e8b0910d0b19fff06fff2fe09e415848a462355.tar.gz
gcc-2e8b0910d0b19fff06fff2fe09e415848a462355.tar.bz2
20000511-1.f: New test.
* g77.f-torture/compile/20000511-1.f: New test. * g77.f-torture/compile/20000511-2.f: New test. From-SVN: r33866
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000511-1.f21
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20000511-2.f61
3 files changed, 87 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 71377d8..fc9c841 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 11 19:02:43 2000 Jeffrey A Law (law@cygnus.com)
+
+ * g77.f-torture/compile/20000511-1.f: New test.
+ * g77.f-torture/compile/20000511-2.f: New test.
+
2000-05-11 Michael Meissner <meissner@redhat.com>
* gcc.c-torture/execute/20000511-1.c: New test.
diff --git a/gcc/testsuite/g77.f-torture/compile/20000511-1.f b/gcc/testsuite/g77.f-torture/compile/20000511-1.f
new file mode 100644
index 0000000..ff95214
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/compile/20000511-1.f
@@ -0,0 +1,21 @@
+ subroutine saxpy(n,sa,sx,incx,sy,incy)
+C
+C constant times a vector plus a vector.
+C uses unrolled loop for increments equal to one.
+C jack dongarra, linpack, 3/11/78.
+C modified 12/3/93, array(1) declarations changed to array(*)
+C
+ real sx(*),sy(*),sa
+ integer i,incx,incy,ix,iy,m,mp1,n
+C
+C -ffast-math ICE provoked by this conditional
+ if(sa /= 0.0)then
+C
+C code for both increments equal to 1
+C
+ do i= 1,n
+ sy(i)= sy(i)+sa*sx(i)
+ enddo
+ endif
+ return
+ end
diff --git a/gcc/testsuite/g77.f-torture/compile/20000511-2.f b/gcc/testsuite/g77.f-torture/compile/20000511-2.f
new file mode 100644
index 0000000..84542c5
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/compile/20000511-2.f
@@ -0,0 +1,61 @@
+ subroutine sgbcon(norm,n,kl,ku,ab,ldab,ipiv,anorm,rcond,work,iwork
+ &,info)
+C
+C -- LAPACK routine (version 3.0) --
+C Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+C Courant Institute, Argonne National Lab, and Rice University
+C September 30, 1994
+C
+C .. Scalar Arguments ..
+ character norm
+ integer info,kl,ku,ldab,n
+ real anorm,rcond
+C ..
+C .. Array Arguments ..
+ integer ipiv(n),iwork(n)
+ real ab(ldab,n),work(n)
+C ..
+C
+C Purpose
+C =======
+C demonstrate g77 bug at -O -funroll-loops
+C =====================================================================
+C
+C .. Parameters ..
+ real one,zero
+ parameter(one= 1.0e+0,zero= 0.0e+0)
+C ..
+C .. Local Scalars ..
+ logical lnoti,onenrm
+ character normin
+ integer ix,j,jp,kase,kase1,kd,lm
+ real ainvnm,scale,smlnum,t
+C ..
+C .. External Functions ..
+ logical lsame
+ integer isamax
+ real sdot,slamch
+ externallsame,isamax,sdot,slamch
+C ..
+C .. External Subroutines ..
+ externalsaxpy,slacon,slatbs,srscl,xerbla
+C ..
+C .. Executable Statements ..
+C
+C Multiply by inv(L).
+C
+ do j= 1,n-1
+C the following min() intrinsic provokes this bug
+ lm= min(kl,n-j)
+ jp= ipiv(j)
+ t= work(jp)
+ if(jp.ne.j)then
+C but only when combined with this if block
+ work(jp)= work(j)
+ work(j)= t
+ endif
+C and this subroutine call
+ call saxpy(lm,-t,ab(kd+1,j),1,work(j+1),1)
+ enddo
+ return
+ end