| 1 |
! { dg-do run } |
| 2 |
! PR25828 Stream IO test 7, Array writes and reads. |
| 3 |
! Contributed by Jerry DeLisle <[email protected]>. |
| 4 |
program streamtest |
| 5 |
implicit none |
| 6 |
character(1) :: lf = char(10) |
| 7 |
character(1) :: tchar |
| 8 |
integer :: i,j,k |
| 9 |
real(kind=4), dimension(100,100) :: anarray |
| 10 |
open(10, file="teststream_streamio_7", access="stream", form="unformatted") |
| 11 |
anarray = 3.14159 |
| 12 |
write(10) anarray |
| 13 |
anarray = 0.0 |
| 14 |
read(10, pos=1) anarray |
| 15 |
anarray = abs(anarray - 3.14159) |
| 16 |
if (any(anarray.gt.0.00001)) STOP 1 |
| 17 |
close(10,status="delete") |
| 18 |
end program streamtest |