summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr45578.f90
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/pr45578.f90
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/pr45578.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr45578.f9053
1 files changed, 53 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr45578.f90 b/gcc/testsuite/gfortran.dg/pr45578.f90
new file mode 100644
index 000000000..da8863dc6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr45578.f90
@@ -0,0 +1,53 @@
+! { dg-do run }
+!*==CENTCM.spg processed by SPAG 6.55Dc at 09:26 on 23 Sep 2005
+ SUBROUTINE CENTCM
+ IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+ PARAMETER (NM=16384)
+ PARAMETER (NG=100)
+ PARAMETER (NH=100)
+ PARAMETER (MU=20)
+ PARAMETER (NL=1)
+ PARAMETER (LL=10*NM)
+ PARAMETER (KP=2001,KR=2001,KG=2001)
+ COMMON /LCS / X0(3,-2:NM) , X(3,-2:NM,5) , XIN(3,-2:NM)
+ COMMON /MOLEC / LPBc(3) , MOLsp , MOLsa , NBX , NBY , NBZ , NPLa ,&
+ & LPBcsm
+ cm1 = 0.D0
+ cm2 = 0.D0
+ cm3 = 0.D0
+ DO i = 1 , MOLsa
+ cm1 = cm1 + X0(1,i)
+ cm2 = cm2 + X0(2,i)
+ cm3 = cm3 + X0(3,i)
+ ENDDO
+ cm1 = cm1/MOLsa
+ cm2 = cm2/MOLsa
+ cm3 = cm3/MOLsa
+ IF ( (cm1.EQ.0.D0) .AND. (cm2.EQ.0.D0) .AND. (cm3.EQ.0.D0) ) &
+ & RETURN
+ DO i = 1 , MOLsa
+ X0(1,i) = X0(1,i) - cm1
+ X0(2,i) = X0(2,i) - cm2
+ X0(3,i) = X0(3,i) - cm3
+ XIN(1,i) = XIN(1,i) - cm1
+ XIN(2,i) = XIN(2,i) - cm2
+ XIN(3,i) = XIN(3,i) - cm3
+ ENDDO
+ CONTINUE
+ END
+ PROGRAM test
+ IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+ PARAMETER (NM=16384)
+ PARAMETER (NG=100)
+ PARAMETER (NH=100)
+ PARAMETER (MU=20)
+ PARAMETER (NL=1)
+ PARAMETER (LL=10*NM)
+ PARAMETER (KP=2001,KR=2001,KG=2001)
+ COMMON /LCS / X0(3,-2:NM) , X(3,-2:NM,5) , XIN(3,-2:NM)
+ COMMON /MOLEC / LPBc(3) , MOLsp , MOLsa , NBX , NBY , NBZ , NPLa ,&
+ & LPBcsm
+ MOLsa = 10
+ X0 = 1.
+ CALL CENTCM
+ END