coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / read_x_eof.f90
blobf79f78522a7a854b4cbd958258341ae1c8248e1b
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