libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / streamio_16.f90
blob7a1ab115da7dd7891c516e3da78435538793bacf
1 ! { dg-do run }
2 ! PR38291 Rejects I/O with POS= if FMT=*
3 character(15) :: sAccess
4 character(1) :: instr
5 integer :: mypos, i
6 mypos = 0
7 open(50, access="stream", form="formatted")
8 write(50, *, pos=1) "Just something "
9 do i=1,17
10 read( 50, *,pos=i)
11 inquire(50, access=sAccess, pos=mypos)
12 if (sAccess.ne."STREAM") call abort
13 if ((mypos.ne.18).and.(mypos.ne.19)) call abort
14 end do
15 read (50,*, end=10)
16 call abort
17 10 continue
18 close(50,status="delete")
19 end