https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100948
Bug ID: 100948 Summary: [12 Regression] ICE in gfc_conv_expr_val, at fortran/trans-expr.c:9069 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This changed between 20210530 (accepted) and 20210606 (ICE) : (see also pr83522) $ cat z1.f90 program p type t character(:), allocatable :: c(:) end type type(t), allocatable :: x associate (y => x%c(:)(:)) end associate end $ gfortran-12-20210530 -c z1.f90 $ $ gfortran-12-20210606 -c z1.f90 z1.f90:6:29: 6 | associate (y => x%c(:)(:)) | 1 internal compiler error: Segmentation fault 0xc79a6f crash_signal ../../gcc/toplev.c:327 0x7cf4f6 gfc_conv_expr_val(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:9069 0x7cf723 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*) ../../gcc/fortran/trans-expr.c:9084 0x7cf723 gfc_get_expr_charlen(gfc_expr*) ../../gcc/fortran/trans-expr.c:2158 0x7a11bf gfc_get_array_span(tree_node*, gfc_expr*) ../../gcc/fortran/trans-array.c:873 0x7acab0 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-array.c:7740 0x80d462 trans_associate_var ../../gcc/fortran/trans-stmt.c:1917 0x8141f1 gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2311 0x79e5a7 trans_code ../../gcc/fortran/trans.c:2014 0x7c4bc4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6893 0x74b3f6 translate_all_program_units ../../gcc/fortran/parse.c:6461 0x74b3f6 gfc_parse_file() ../../gcc/fortran/parse.c:6730 0x79772f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212