| 1 |
! { dg-do run { target fd_truncate } } |
| 2 |
! PR25139 Repeated backspaces and reads. |
| 3 |
! Derived from example given in PR by Dale Ranta and FX Coudert |
| 4 |
! Contributed by Jerry DeLisle <[email protected]> |
| 5 |
integer dat(5) |
| 6 |
dat = (/ 0, 0, 0, 0, 1 /) |
| 7 |
write(11) dat,dat,dat,dat |
| 8 |
rewind 11 |
| 9 |
write(11) dat |
| 10 |
read(11,end=1008) dat |
| 11 |
STOP 1 |
| 12 |
1008 continue |
| 13 |
backspace 11 |
| 14 |
write(11) dat |
| 15 |
read(11,end=1011) dat |
| 16 |
STOP 2 |
| 17 |
1011 continue |
| 18 |
backspace 11 |
| 19 |
backspace 11 |
| 20 |
close(11, status='delete') |
| 21 |
end |
| 22 |
|