https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755
Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gerhard.steinmetz.fortran@t | |-online.de --- Comment #9 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Reduced and simplified a bit more. Element "buffer" in "t_string" is not needed to produce the ICE, thus commented out. $ cat pr72755_c9.f90 module m72755 type t_string ! character(len=:), allocatable :: buffer contains procedure :: string_assign_from_string generic :: assignment(=) => string_assign_from_string end type type t_msg type(t_string) :: text end type contains subroutine string_assign_from_string( left, right ) class(t_string), intent(inout) :: left type(t_string), intent(in) :: right end subroutine subroutine messages_push_back( array, msg ) type(t_msg), allocatable, intent(inout) :: array(:) type(t_msg), intent(in) :: msg array(1) = msg !! end subroutine end module $ gfortran-7-20161204 -c pr72755_c9.f90 pr72755_c9.f90:21:0: end module internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202