summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/g77/20010116.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/20010116.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/20010116.f')
-rw-r--r--gcc/testsuite/gfortran.dg/g77/20010116.f41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/g77/20010116.f b/gcc/testsuite/gfortran.dg/g77/20010116.f
new file mode 100644
index 000000000..ca7375d0f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/g77/20010116.f
@@ -0,0 +1,41 @@
+c { dg-do run }
+c { dg-options "-std=legacy" }
+c
+*
+* Derived from LAPACK 3.0 routine CHGEQZ
+* Fails on i686-pc-cygwin with gcc-2.97 snapshots at -O2 and higher
+* PR fortran/1645
+*
+* David Billinghurst, (David.Billinghurst@riotinto.com)
+* 14 January 2001
+* Rewritten by Toon Moene (toon@moene.indiv.nluug.nl)
+* 15 January 2001
+*
+ COMPLEX A(5,5)
+ DATA A/25*(0.0,0.0)/
+ A(4,3) = (0.05,0.2)/3.0E-7
+ A(4,4) = (-0.03,-0.4)
+ A(5,4) = (-2.0E-07,2.0E-07)
+ CALL CHGEQZ( 5, A )
+ END
+ SUBROUTINE CHGEQZ( N, A )
+ COMPLEX A(N,N), X
+ ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
+ DO J = 4, 2, -1
+ I = J
+ TEMP = ABS1( A(J,J) )
+ TEMP2 = ABS1( A( J+1, J ) )
+ TEMPR = MAX( TEMP, TEMP2 )
+ IF( TEMPR .LT. 1.0 .AND. TEMPR .NE. 0.0 ) THEN
+ TEMP = TEMP / TEMPR
+ TEMP2 = TEMP2 / TEMPR
+ END IF
+ IF ( ABS1(A(J,J-1))*TEMP2 .LE. TEMP ) GO TO 90
+ END DO
+c Should not reach here, but need a statement
+ PRINT*
+ 90 IF ( I .NE. 4 ) THEN
+ PRINT*,'I =', I, ' but should be 4'
+ CALL ABORT()
+ END IF
+ END