[Bug fortran/61767] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1491
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 25 12:35:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61767
--- Comment #4 from janus at gcc dot gnu.org ---
Here is a slightly less verbose version of the test case which runs into the
same ICE:
module Communicator_Form
implicit none
type :: CommunicatorForm
contains
final :: Finalize
end type
type :: MessageTemplate
type ( CommunicatorForm ), pointer :: Communicator
end type
contains
subroutine Finalize ( C )
type ( CommunicatorForm ) :: C
end subroutine
end module
program p
use Communicator_Form
implicit none
class ( MessageTemplate ), pointer :: M
end
The ICE is due to this assert ...
gcc_assert (ancestor_wrapper && ancestor_wrapper->ref == NULL
&& ancestor_wrapper->expr_type == EXPR_VARIABLE);
... where ancestor_wrapper is NULL.
More information about the Gcc-bugs
mailing list