-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
flang:runtimequestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Consider the following code:
module m
type base
integer(4), pointer :: i
end type
integer(4), parameter :: ISNULL = -999999
end module
program fdtio504a1
use m
interface write(unformatted)
subroutine unformattedWrite (dtv, unit, iostat, iomsg)
import base
class (base), intent(in) :: dtv
integer, intent(in) :: unit
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
end subroutine
end interface
integer stat
character(8) :: errormsg
open (1, file='fdtio504a1.data', form='unformatted')
write (1, iostat=stat, iomsg=errormsg) base(null())
if (stat == 0) ERROR STOP(1_4)
end
subroutine unformattedWrite (dtv, unit, iostat, iomsg)
use m
class (base), intent(in) :: dtv
integer, intent(in) :: unit
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
write (unit+1, iostat=iostat, iomsg=iomsg) ISNULL
end subroutine
The test case is expecting a runtime iostat= to be set because the child data transfer procedure uses a different UNIT number.
Flang seems ignore it.
Is this an intended extension?
Metadata
Metadata
Assignees
Labels
flang:runtimequestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!