Merge from mainline.
[official-gcc.git] / gcc / testsuite / gfortran.dg / pr19657.f
blob1fe32ac7497750f7976778fbda3b5430f66451af
1 c { dg-do run }
2 c pr 19657
3 c test namelist not skipped if ending with logical.
4 c Based on example provided by fuyuki@ccsr.u-tokyo.ac.jp
6 program pr19657
7 implicit none
8 logical l
9 integer i, ctr
10 namelist /nm/ i, l
11 open (10, status = "scratch")
12 write (10,*) "&nm i=1,l=t &end"
13 write (10,*) "&nm i=2 &end"
14 write (10,*) "&nm i=3 &end"
15 rewind (10)
16 do ctr = 1,3
17 read (10,nm,end=190)
18 if (i.ne.ctr) call abort ()
19 enddo
20 190 continue
21 end