PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr47574.f90
blob65d168630347e8da110f2a0c3c530b6e4e36dac6
1 ! { dg-do compile }
2 ! PR 47574 - this used to ICE.
3 SUBROUTINE EXCH2_UV_AGRID_3D_RL( uPhi, vPhi, myNz )
5 IMPLICIT NONE
7 INTEGER, parameter :: sNx=32, sNy=32, OLx=4, OLy=4
9 INTEGER myNz
10 Real(8) uPhi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNz,3,1)
11 REAL(8) vPhi(1-OLx:sNx+OLx,1-OLy:sNy+OLy,myNz,3,1)
13 INTEGER i,j,k,bi,bj
14 REAL(8) uLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
15 REAL(8) vLoc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
16 REAL(8) negOne
18 negOne = 1.
19 DO k = 1,myNz
20 DO j = 1-OLy,sNy+OLy
21 DO i = 1-OLx,sNx+OLx
22 uLoc(i,j) = uPhi(i,j,k,bi,bj)
23 vLoc(i,j) = vPhi(i,j,k,bi,bj)
24 ENDDO
25 ENDDO
26 DO j = 1-OLy,sNy+OLy
27 DO i = 1,OLx
28 uPhi(1-i,j,k,bi,bj) = vLoc(1-i,j)
29 vPhi(1-i,j,k,bi,bj) = uLoc(1-i,j)*negOne
30 ENDDO
31 ENDDO
33 ENDDO
35 END