[Bug fortran/78848] [OOP] ICE on writing CLASS variable with non-typebound DTIO procedure
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 18 09:35:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78848
--- Comment #4 from janus at gcc dot gnu.org ---
Sorry, actually the example in comment 3 only ICEs if the type-binding of the
DTIO is commented out:
module m
type :: t
integer :: i
contains
! procedure :: wf
! generic :: write(formatted) => wf
end type
interface write(formatted)
procedure wf
end interface
contains
subroutine wf(this, unit, b, c, iostat, iomsg)
class(t), intent(in) :: this
integer, intent(in) :: unit
character, intent(in) :: b
integer, intent(in) :: c(:)
integer, intent(out) :: iostat
character, intent(inout) :: iomsg
WRITE (unit, "(i3)", IOSTAT=iostat, IOMSG=iomsg) this%i
end subroutine
end
program p
use m
class(t), allocatable :: z
allocate(z)
print *, z
end
More information about the Gcc-bugs
mailing list