https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107144
Bug ID: 107144 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.cc:1623 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gfortran 13.0.0 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d) ICEs when compiling the following testcase, reduced from test/Lower/dummy-procedure-character.f90 from the flang 15.0.1 test suite: subroutine call_explicit_length_with_iface(bar10) interface function bar10(n) integer(8) :: n character(n) :: bar10 end function end interface end subroutine % gfortran-13.0.0 -c shfeenyw.f90 shfeenyw.f90:3:4: 3 | function bar10(n) | 1 internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.cc:1623 0x67b718 gfc_get_symbol_decl(gfc_symbol*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-decl.cc:1623 0x9ce6d8 gfc_conv_variable /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-expr.cc:3000 0x9cd257 gfc_conv_expr_val(gfc_se*, gfc_expr*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-expr.cc:9499 0x9cec00 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-expr.cc:9513 0x9cec00 gfc_conv_string_length(gfc_charlen*, gfc_expr*, stmtblock_t*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-expr.cc:2563 0x9ab41e gfc_trans_dummy_character /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-decl.cc:4112 0x9b6f17 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-decl.cc:5000 0x9b9357 gfc_generate_function_code(gfc_namespace*) /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/trans-decl.cc:7757 0x92fa37 translate_all_program_units /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/parse.cc:6671 0x92fa37 gfc_parse_file() /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/parse.cc:6977 0x98248f gfc_be_parse_file /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/fortran/f95-lang.cc:229