https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103590
Bug ID: 103590 Summary: ICE: find_array_spec(): Missing spec 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: --- Affects versions down to at least r5 : $ cat z1.f90 program p associate (a => 1) print *, [character(a(1)) :: '1'] end associate end $ cat z2.f90 program p character :: b(1) associate (a => 1) b = [character(a(1)) :: '1'] end associate end $ gfortran-12-20211205 -c z1.f90 f951: internal compiler error: find_array_spec(): Missing spec 0x799179 gfc_report_diagnostic ../../gcc/fortran/error.c:874 0x79ace7 gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1494 0x81c09f find_array_spec ../../gcc/fortran/resolve.c:4989 0x81c09f gfc_resolve_ref(gfc_expr*) ../../gcc/fortran/resolve.c:5331 0x80c167 resolve_variable ../../gcc/fortran/resolve.c:5842 0x80c167 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7168 0x79f054 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:3155 0x780562 char_len_param_value ../../gcc/fortran/decl.c:1129 0x7830b0 gfc_match_char_spec(gfc_typespec*) ../../gcc/fortran/decl.c:3541 0x7cd8c3 gfc_match_type_spec(gfc_typespec*) ../../gcc/fortran/match.c:2144 0x767b10 gfc_match_array_constructor(gfc_expr**) ../../gcc/fortran/array.c:1246 0x7d39a9 match_primary ../../gcc/fortran/matchexp.c:153 0x7d39a9 match_level_1 ../../gcc/fortran/matchexp.c:211 0x7d39a9 match_mult_operand ../../gcc/fortran/matchexp.c:267 0x7d3c08 match_add_operand ../../gcc/fortran/matchexp.c:356 0x7d3e5c match_level_2 ../../gcc/fortran/matchexp.c:480 0x7d3fb2 match_level_3 ../../gcc/fortran/matchexp.c:551 0x7d40a4 match_level_4 ../../gcc/fortran/matchexp.c:599 0x7d40a4 match_and_operand ../../gcc/fortran/matchexp.c:693 0x7d4292 match_or_operand ../../gcc/fortran/matchexp.c:722