2010-11-30 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / reshape_2.f90
blobd28058dddb237691f26f4bbc6daf9d95bdc51de0
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
24 ! { dg-final { cleanup-modules "splitprms" } }