PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / list_read_9.f90
blobdac0dc8cd1d707a58fb89f9f7c66ae5a3a04a042
1 ! { dg-do run }
2 ! pr37083 formatted read of line without trailing new-line fails
3 real :: a, b, c
4 open(unit=10,file="atest",access='stream',form='unformatted',&
5 & status="replace")
6 write(10) '1.2'//achar(10)//'2.2'//achar(10)//'3.'
7 call fputc(10,'3')
8 close(10, status="keep")
9 open(unit=10,file="atest",form='formatted',status="old")
10 read(10,*) a, b, c
11 if (a.ne.1.2 .or. b.ne.2.2 .or. c.ne.3.3) call abort
12 close(10, status="delete")
13 end