https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101327
Bug ID: 101327 Summary: ICE in find_array_element, at fortran/expr.c:1355 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 subroutine s integer, parameter :: n([2]) = [1, 2] type t integer :: a(n(1):n(2)) end type end $ gfortran-12-20210704 -c z1.f90 f951: internal compiler error: in find_array_element, at fortran/expr.c:1355 0x6fe17d find_array_element ../../gcc/fortran/expr.c:1354 0x6fe17d simplify_const_ref ../../gcc/fortran/expr.c:1882 0x6fe85e gfc_simplify_expr(gfc_expr*, int) ../../gcc/fortran/expr.c:2281 0x6feaab simplify_parameter_variable ../../gcc/fortran/expr.c:2110 0x6fe82d gfc_simplify_expr(gfc_expr*, int) ../../gcc/fortran/expr.c:2248 0x6ea784 variable_decl ../../gcc/fortran/decl.c:2640 0x6ea784 gfc_match_data_decl() ../../gcc/fortran/decl.c:6201 0x751bd3 match_word ../../gcc/fortran/parse.c:65 0x751bd3 decode_statement ../../gcc/fortran/parse.c:376 0x75361a next_free ../../gcc/fortran/parse.c:1351 0x75361a next_statement ../../gcc/fortran/parse.c:1583 0x755114 parse_derived ../../gcc/fortran/parse.c:3490 0x755114 parse_spec ../../gcc/fortran/parse.c:4031 0x757aac parse_progunit ../../gcc/fortran/parse.c:6009 0x759560 gfc_parse_file() ../../gcc/fortran/parse.c:6557 0x7a5c4f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:216