2 ! { dg-options "-std=legacy" }
5 ! We weren't resetting the internal EOR flag correctly, so the second read
6 ! wasn't advancing to the next line.
11 open (unit
=io_unit
,status
='scratch',form
='formatted')
12 write (io_unit
, '(A)') "Line1"
13 write (io_unit
, '(A)') "Line2"
14 write (io_unit
, '(A)') "Line3"
16 read (io_unit
,'(A)') str
17 if (str
.ne
. "Line1") call abort
19 read (io_unit
,'(A)') str
20 if (str
.ne
. "Line3") call abort