1 ! { dg-do run { target fd_truncate } }
3 ! We weren't resetting the internal EOR flag correctly, so the second read
4 ! wasn't advancing to the next line.
9 open (unit
=io_unit
,status
='scratch',form
='formatted')
10 write (io_unit
, '(A)') "Line1"
11 write (io_unit
, '(A)') "Line2"
12 write (io_unit
, '(A)') "Line3"
14 read (io_unit
,'(A)') str
15 if (str
.ne
. "Line1") call abort
17 read (io_unit
,'(A)') str
18 if (str
.ne
. "Line3") call abort