gcc/testsuite/gfortran.dg/streamio_16.f90
raw| 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") STOP 1 |
| 13 | if ((mypos.ne.18).and.(mypos.ne.19)) STOP 2 |
| 14 | end do |
| 15 | read (50,*, end=10) |
| 16 | STOP 3 |
| 17 | 10 continue |
| 18 | close(50,status="delete") |
| 19 | end |