OSDN Git Service

PR debug/43329
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / read_x_eof.f90
1 ! { dg-do run }
2 ! PR43265 No EOF condition if reading with '(x)' from an empty file
3 ! Test case from the reporter.
4 program pr43265
5 implicit none
6 integer::i
7 open(23,status="scratch")
8 write(23,'(a)') "Line 1"
9 write(23,'(a)') "Line 2"
10 write(23,'(a)') "Line 3"
11 rewind(23)
12 do i=1,10
13   read(23,'(1x)',end=12)
14 enddo
15 12 if (i.ne.4) call abort
16 end