2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr39152.f
blob477200f359a2215f4995252617b607d616fc6d99
1 ! { dg-do compile }
2 ! { dg-options "-O2" }
3 SUBROUTINE CASHES(E,HESS,FC,FA,NORB,NPR)
4 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
5 PARAMETER (MXAO=2047)
6 DIMENSION HESS(NPR),E(NORB,*),FC(*),FA(*)
7 COMMON /IJPAIR/ IA(MXAO)
8 COMMON /MCPAR / NFZC,NCORBS,NCI,NORBS,NORBX,NUM
9 K=0
10 DO 200 IU = 1,NORB - NCORBS
11 I = IU + NCORBS
12 II=IA(I)+I
13 DO 100 J = 1,NCORBS
14 IF (I.GT.NORBS) THEN
15 HESS(K)=FC(II) + FA(II) - E(J,J)
16 ELSE
17 HESS(K)=FA(II) - E(I,I) - E(J,J) + FC(JJ) + FA(JJ)
18 END IF
19 100 CONTINUE
20 200 CONTINUE
21 RETURN
22 END