2011-05-23 Tom de Vries <tom@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr43505.f90
blobb912c9ff0dd8f3cfd3202fd754043b11a131046e
1 MODULE MAIN1
2 INTEGER , PARAMETER :: MXGLVL = 87
3 CHARACTER(8) :: SRCTYP
4 REAL :: GRIDWS(MXGLVL)
5 REAL :: ZI, HS
6 END MODULE MAIN1
8 PROGRAM TEST
9 USE MAIN1
10 IF (HS >= ZI) THEN
11 ELSEIF ( SRCTYP == 'AREA' &
12 .OR. SRCTYP == 'AREAPOLY' &
13 .OR. SRCTYP == 'AREACIRC' &
14 .OR. SRCTYP == 'OPENPIT' ) THEN
15 CALL ANYAVG (MXGLVL, GRIDWS)
16 CALL ANYAVG (MXGLVL, GRIDWS)
17 ELSE
18 IF ( HS > 0.0 ) THEN
19 CALL ANYAVG (MXGLVL, GRIDWS)
20 CALL ANYAVG (MXGLVL, GRIDWS)
21 CALL ANYAVG (MXGLVL, GRIDWS)
22 ENDIF
23 ENDIF
24 IF (HS.LT.ZI) THEN
25 ZI = HS
26 ENDIF
27 contains
28 SUBROUTINE ANYAVG(NLVLS,HTS)
29 INTEGER NLVLS
30 REAL HTS(NLVLS)
31 IF (5.LT.NLVLS) THEN
32 CALL GINTRP (HTS(5),HTS(5+1))
33 ENDIF
34 CALL GINTRP (HTS(5-1), HTS(5))
35 END SUBROUTINE ANYAVG
37 subroutine gintrp (x1, x2)
38 print *, x1, x2
39 end subroutine
41 END PROGRAM TEST
42 ! { dg-final { cleanup-modules "main1" } }