OSDN Git Service

08945a1267e68a508452cc7be9593c64b469d93d
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / ldist-1.f90
1 ! { dg-do compile }     
2 ! { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" }
3
4 Subroutine PADEC(DKS,DKDS,HVAR,WM,WG,FN,NS,AN,BN,CN,IT)
5   IMPLICIT REAL*8 (A-H, O-Z)
6   DIMENSION DKS(*),DKDS(*),HVAR(*)
7   COMPLEX*16 WM(*),WG(*),FN(*),AN(*),BN(*),CN(*)
8   COMPLEX*16 H2,CONST
9   COMMON/STRCH/ALP,BET,DH,ZH,UG,VG,T1,T2,DT,TOL,ALPHA ,HAMP,BUMP
10   Parameter (F1 = .8333333333333333D0, F2 = .0833333333333333D0)
11
12   SS=DT/(2.0D0)
13
14   do J=2,NS
15      BS=SS*DKS(J)*HVAR(J)*HVAR(J)
16      AN(J)=F1+2.*BS
17      BN(J)=F2-BS
18      CN(J)=F2-BS
19      H2=WM(J+1)
20
21      if(J.EQ.NS) then
22         CONST=CN(J)*H2
23      else
24         CONST=(0.D0,0.D0)
25      endif
26      FN(J)=(BS+F2)*(H2)+(F1-2.D0*BS)-CONST
27   end do
28
29   return
30 end Subroutine PADEC
31
32 ! { dg-final { scan-tree-dump-times "distributed: split to 5 loops" 1 "ldist" } }
33 ! { dg-final { cleanup-tree-dump "ldist" } }