2 ! { dg-shouldfail "The users message" }
8 interface read (unformatted
)
9 module procedure read_unformatted
10 end interface read (unformatted
)
12 subroutine read_unformatted (dtv
, unit
, piostat
, piomsg
)
13 class (char
), intent(inout
) :: dtv
14 integer, intent(in
) :: unit
15 !character (len=*), intent(in) :: iotype
16 !integer, intent(in) :: vlist(:)
17 integer, intent(out
) :: piostat
18 character (len
=*), intent(inout
) :: piomsg
19 read (unit
,fmt
='(A1)', advance
="no", iostat
=piostat
, iomsg
=piomsg
) dtv
%ch
21 piomsg
="The users message"
22 end subroutine read_unformatted
30 open (10, form
='unformatted', status
='scratch')
35 ! { dg-output ".*(unit = 10, file = .*)" }
36 ! { dg-output "Fortran runtime error: The users message" }