summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/async_io_3.f90
blob: 7d5124868cfcb00fdbd61d22aecd812a7386a8e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

!TODO: Move these testcases to gfortran testsuite
! once compilation with pthreads is supported there
! { dg-do run }
program main
  integer :: i
  open (10,file="tst.dat")
  write (10,'(A4)') 'asdf'
  close(10)
  i = 234
  open(10,file="tst.dat", asynchronous="yes")
  read (10,'(I4)',asynchronous="yes") i
  wait(10)
end program main
! { dg-output "Fortran runtime error: Bad value during integer read" }
! { dg-final { remote_file build delete "tst.dat" } }