This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/64578] [OOP] Seg-fault and ICE with unlimited polymorphic array pointer function
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Jan 2015 13:45:20 +0000
- Subject: [Bug fortran/64578] [OOP] Seg-fault and ICE with unlimited polymorphic array pointer function
- Auto-submitted: auto-generated
- References: <bug-64578-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64578
--- Comment #7 from janus at gcc dot gnu.org ---
In fact also a normal class pointer is sufficient to trigger the ICE. It
doesn't need to be unlimited, but it needs to be an array:
type foo
end type
print *, associated(return_pointer()) ! ICE
contains
function return_pointer()
class(foo), pointer :: return_pointer(:)
end function
end