| 1 |
! { dg-do run } |
| 2 |
! PR25828 Stream IO test 3, tests read_x and inquire. |
| 3 |
! Contributed by Jerry DeLisle <[email protected]>. |
| 4 |
program streamio_3 |
| 5 |
implicit none |
| 6 |
integer :: i(6),j |
| 7 |
character(10) :: myaccess |
| 8 |
open(10, access="stream", form="formatted") |
| 9 |
i = (/(j,j=1,6)/) |
| 10 |
write(10,'(3(2x,i4/)/3(3x,i6/))') i |
| 11 |
i = 0 |
| 12 |
rewind(10) |
| 13 |
read(10,'(3(2x,i4/)/3(3x,i6/))') i |
| 14 |
if (any(i.ne.(/(j,j=1,6)/))) STOP 1 |
| 15 |
inquire(unit=10, access=myaccess) |
| 16 |
if (myaccess.ne."STREAM") STOP 2 |
| 17 |
close(10,status="delete") |
| 18 |
end program streamio_3 |