https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78719
Bug ID: 78719 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code (due to an extra declaration flagged with "!!"), down to at least 4.8 : $ cat z1.f90 program p type t integer :: n end type class(t) :: g !! abstract interface subroutine h end end interface procedure(h), pointer :: s s => f call s s => g call s contains subroutine f print *, 'inside f' end subroutine g print *, 'inside g' end end $ gfortran-7-20161204 z1.f90 z1.f90:13:0: s => g internal compiler error: Segmentation fault 0xc4940f crash_signal ../../gcc/toplev.c:333 0x75a0e9 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1438 0x7731af gfc_conv_variable ../../gcc/fortran/trans-expr.c:2494 0x76ee42 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:7771 0x77bc97 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8169 0x72e667 trans_code ../../gcc/fortran/trans.c:1798 0x75f708 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6271 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202