summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/g77/20000511-2.f
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/g77/20000511-2.f
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/g77/20000511-2.f')
-rw-r--r--gcc/testsuite/gfortran.dg/g77/20000511-2.f62
1 files changed, 62 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/g77/20000511-2.f b/gcc/testsuite/gfortran.dg/g77/20000511-2.f
new file mode 100644
index 000000000..1ae24ae5b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/20000511-2.f
@@ -0,0 +1,62 @@
+c { dg-do compile }
+ 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