Fix gcc.c-torture/execute/ieee/cdivchkf.c on hpux
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / async_io_9.f90
blob2dc111c3967781fb29f1575d506932ee295fb4f3
1 ! { dg-do run }
2 ! PR 95191 - this used to hang.
3 ! Original test case by Bill Long.
4 program test
5 real a(10000)
6 integer my_id
7 integer bad_id
8 integer :: iostat
9 character (len=100) :: iomsg
10 data my_id /1/
11 data bad_id /2/
12 a = 1.
13 open (unit=10, file='test.dat', form='unformatted', &
14 & asynchronous='yes')
15 write (unit=10, asynchronous='yes', id=my_id) a
16 iomsg = ""
17 wait (unit=10, id=bad_id, iostat=iostat, iomsg=iomsg)
18 if (iostat == 0 .or. iomsg /= "Bad ID in WAIT statement") stop 1
19 close (unit=10, status='delete')
20 end program test