https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95373
Bug ID: 95373 Summary: [9/10/11 Regression] ICE in build_reference_type, at tree.c:7942 Product: gcc Version: 11.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 20181028 (error) and 20181104 (ICE), with option -std=f95 : $ cat z1.f90 subroutine s(x) integer, parameter :: i = 3 real(i%kind) :: x end $ gfortran-11-20200524 -c z1.f90 $ gfortran-11-20200524 -c z1.f90 -std=f95 z1.f90:1:0: 1 | subroutine s(x) | internal compiler error: Segmentation fault 0xd548ff crash_signal ../../gcc/toplev.c:328 0x106d708 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3418 0x106d708 build_reference_type(tree_node*) ../../gcc/tree.c:7942 0x7ea456 gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2307 0x7ea993 gfc_get_function_type(gfc_symbol*, gfc_actual_arglist*) ../../gcc/fortran/trans-types.c:3059 0x7655a6 build_function_decl ../../gcc/fortran/trans-decl.c:2354 0x76be09 gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:3048 0x776e3f gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6729 0x6ee246 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6ee246 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x73a76f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210