gcc/testsuite/gfortran.dg/streamio_17.f90
raw| 1 | ! { dg-do run } |
| 2 | program stream_test |
| 3 | implicit none |
| 4 | integer :: ios |
| 5 | character(128) :: message |
| 6 | open(10, status='scratch', access='stream') |
| 7 | write (10, rec=1, iostat=ios, iomsg=message) "This is a test" ! |
| 8 | if (ios.ne.5001) STOP 1 |
| 9 | if (message.ne. & |
| 10 | &"Record number not allowed for stream access data transfer") & |
| 11 | STOP 2 |
| 12 | end program |