https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84957
Bug ID: 84957 Summary: [8 Regression] ICE in gfc_sym_type, at fortran/trans-types.c:2255 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20171119 and 20171126 : $ cat z1.f90 function f() result(u) entry g() result(v) contains function v(x) result(z) character :: x(2) character(sum(len_trim(x))) :: z end end $ cat z2.f90 function f() result(u) entry g() result(v) contains function u(x) result(z) character :: x(2) character(sum(len_trim(x))) :: z end end $ gfortran-8-20171119 -c z1.f90 $ $ gfortran-8-20180318 -c z1.f90 z1.f90:2:0: entry g() result(v) internal compiler error: Segmentation fault 0xb9bd5f crash_signal ../../gcc/toplev.c:325 0x7c348b gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2255 0x7c18e3 gfc_get_function_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:3031 0x766a9f build_function_decl ../../gcc/fortran/trans-decl.c:2233 0x768561 build_entry_thunks ../../gcc/fortran/trans-decl.c:2739 0x768561 gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:2913 0x77284b gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6398 0x7009c0 translate_all_program_units ../../gcc/fortran/parse.c:6121 0x7009c0 gfc_parse_file() ../../gcc/fortran/parse.c:6324 0x74755f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204