2 ! PR43265: See comment #26 in the PR. Before patch,
3 ! the test case would fail to read the last line of the file.
4 ! Thanks to Jean-Baptiste Faure for providing the initial test case.
6 character (len
=6) :: line
8 open(unit
=25,file
="test.dat",status
="replace", &
9 & form
="unformatted", access
="stream")
10 write(25) "Line 1" // char(10)
11 write(25) "Line 2" // char(10)
12 write(25) "Line 3" // char(10)
13 write(25) "Line 4" // char(10)
14 write(25) "Line 5" ! No EOR marker on the last line.
15 close(25, status
="keep")
16 open(25, file
="test.dat", status
="old")
18 read(25,'(a)',end=100,err
=101) line
22 100 if (k
/= 5) call abort