libgomp/testsuite/libgomp.fortran/async_io_2.f90
raw| 1 | ! { dg-do run } |
| 2 | !TODO: Move these testcases to gfortran testsuite |
| 3 | ! once compilation with pthreads is supported there |
| 4 | program main |
| 5 | implicit none |
| 6 | integer :: i, ios |
| 7 | character(len=100) :: iom |
| 8 | open (10,file="tst.dat") |
| 9 | write (10,'(A4)') 'asdf' |
| 10 | close(10) |
| 11 | i = 234 |
| 12 | open(10,file="tst.dat", asynchronous="yes") |
| 13 | read (10,'(I4)',asynchronous="yes") i |
| 14 | iom = ' ' |
| 15 | wait (10,iostat=ios,iomsg=iom) |
| 16 | if (iom == ' ') stop 1 |
| 17 | close(10,status="delete") |
| 18 | end program main |