diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/pr37243.f | |
download | cbb-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/pr37243.f')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr37243.f | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr37243.f b/gcc/testsuite/gfortran.dg/pr37243.f new file mode 100644 index 000000000..0a606ad77 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr37243.f @@ -0,0 +1,65 @@ +! PR rtl-optimization/37243 +! { dg-do run } +! { dg-add-options ieee } +! Check if register allocator handles IR flattening correctly. + SUBROUTINE SCHMD(V,M,N,LDV) + IMPLICIT DOUBLE PRECISION(A-H,O-Z) + LOGICAL GOPARR,DSKWRK,MASWRK + DIMENSION V(LDV,N) + COMMON /IOFILE/ IR,IW,IP,IS,IPK,IDAF,NAV,IODA(400) + COMMON /PAR / ME,MASTER,NPROC,IBTYP,IPTIM,GOPARR,DSKWRK,MASWRK + PARAMETER (ZERO=0.0D+00, ONE=1.0D+00, TOL=1.0D-10) + IF (M .EQ. 0) GO TO 180 + DO 160 I = 1,M + DUMI = ZERO + DO 100 K = 1,N + 100 DUMI = DUMI+V(K,I)*V(K,I) + DUMI = ONE/ SQRT(DUMI) + DO 120 K = 1,N + 120 V(K,I) = V(K,I)*DUMI + IF (I .EQ. M) GO TO 160 + I1 = I+1 + DO 140 J = I1,M + DUM = -DDOT(N,V(1,J),1,V(1,I),1) + CALL DAXPY(N,DUM,V(1,I),1,V(1,J),1) + 140 CONTINUE + 160 CONTINUE + IF (M .EQ. N) RETURN + 180 CONTINUE + I = M + J = 0 + 200 I0 = I + I = I+1 + IF (I .GT. N) RETURN + 220 J = J+1 + IF (J .GT. N) GO TO 320 + DO 240 K = 1,N + 240 V(K,I) = ZERO + CALL DAXPY(N,DUM,V(1,I),1,V(1,I),1) + 260 CONTINUE + DUMI = ZERO + DO 280 K = 1,N + 280 DUMI = DUMI+V(K,I)*V(K,I) + IF ( ABS(DUMI) .LT. TOL) GO TO 220 + DO 300 K = 1,N + 300 V(K,I) = V(K,I)*DUMI + GO TO 200 + 320 END + program main + DOUBLE PRECISION V + DIMENSION V(18, 18) + common // v + + call schmd(V, 1, 18, 18) + end + + subroutine DAXPY(N,D,V,M,W,L) + INTEGER :: N, M, L + DOUBLE PRECISION D, V(1,1), W(1,1) + end + + FUNCTION DDOT (N,V,M,W,L) + INTEGER :: N, M, L + DOUBLE PRECISION DDOT, V(1,1), W(1,1) + DDOT = 1 + end |