https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95585
Bug ID: 95585 Summary: ICE in gfc_check_reshape, at fortran/check.c:4751 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: --- Affects versions down to at least r5 : $ cat z1.f90 program p integer, parameter :: a(2) = reshape([1, 2], a) end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0x62e589 gfc_check_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/check.c:4751 0x66a55c do_check ../../gcc/fortran/intrinsic.c:4737 0x66a55c check_specific ../../gcc/fortran/intrinsic.c:4750 0x674854 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4987 0x6c2733 resolve_unknown_f ../../gcc/fortran/resolve.c:2902 0x6c2733 resolve_function ../../gcc/fortran/resolve.c:3246 0x6c2733 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7040 0x65a154 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:3085 0x65d3e0 gfc_match_init_expr(gfc_expr**) ../../gcc/fortran/expr.c:3133 0x648c84 variable_decl ../../gcc/fortran/decl.c:2886 0x648c84 gfc_match_data_decl() ../../gcc/fortran/decl.c:6195 0x6ab513 match_word ../../gcc/fortran/parse.c:65 0x6ab513 decode_statement ../../gcc/fortran/parse.c:376 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6af304 parse_spec ../../gcc/fortran/parse.c:3738 0x6b137c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b2a59 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212