1! { dg-do run } 2! PR 95115 - this used to hang with -pthread. Original test case by 3! Bill Long. 4 5program test 6 character(len=16) my_status 7 character(len=1000) :: iomsg 8 open (unit=10, file='test.dat') 9 print *,42 10 write (10, *) 'weird' 11 rewind (10) 12 read (10, *) my_status 13 close (10) 14 open (unit=10, file='test.dat') 15 close (unit=10, status=my_status, iostat=ios, iomsg=iomsg) 16 if (ios == 0) stop 1 17 if (iomsg /= "Bad STATUS parameter in CLOSE statement") stop 2 18 close (10, status='delete') 19end program test 20