2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / reshape_2.f90
blob1a85712292db66a9314dc6f6a900e35a941aa23c
1 ! { dg-do run }
2 ! PR34556 Rejects valid with bogus error message: parameter initalization
3 ! Found using the Fortran Company Fortran 90 Test Suite (Lite),
4 ! Version 1.4
5 ! Test case modified by Jerry DeLisle <jvdelisle@gcc.gnu.org to
6 ! show correct results.
7 module splitprms
8 integer, parameter :: nplam = 3 ! # of plans to expand TABs
9 integer, parameter :: linem = 132 ! max. line length
10 integer, parameter :: ncntm = 39 ! max. # cont. lines
11 integer, parameter, dimension (linem, nplam) :: nxttab = &
12 reshape ([[(6, i= 1, 2*linem) ], [(i, i= 1,linem)], &
13 max ([(i, i= 1,linem)], [(10*i, i= 1,linem)])], &
14 [linem, nplam ])
15 end module splitprms
17 program test
18 use splitprms
19 if (nxttab(1, 1) .ne. 6) call abort
20 if (nxttab(1, nplam) .ne. 1) call abort
21 if (nxttab(linem, 1) .ne. 6) call abort
22 if (nxttab(linem, nplam) .ne. 132) call abort
23 end program test