https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102717

            Bug ID: 102717
           Summary: ICE in gfc_simplify_reshape, at
                    fortran/simplify.c:6843
           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
   integer, parameter :: a(1) = 2
   integer, parameter :: b(2,2) = reshape([1,2,3,4], -[a,a])
end


$ gfortran-12-20211010 -c z1.f90
f951: internal compiler error: in gfc_simplify_reshape, at
fortran/simplify.c:6843
0x82b845 gfc_simplify_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.c:6843
0x7aa71b do_simplify
        ../../gcc/fortran/intrinsic.c:4678
0x7b50ba gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.c:5050
0x8078e9 resolve_unknown_f
        ../../gcc/fortran/resolve.c:2937
0x8078e9 resolve_function
        ../../gcc/fortran/resolve.c:3281
0x8078e9 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:7115
0x79a244 gfc_reduce_init_expr(gfc_expr*)
        ../../gcc/fortran/expr.c:3125
0x79d4b0 gfc_match_init_expr(gfc_expr**)
        ../../gcc/fortran/expr.c:3173
0x787c74 variable_decl
        ../../gcc/fortran/decl.c:3016
0x787c74 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:6325
0x7f01d3 match_word
        ../../gcc/fortran/parse.c:65
0x7f01d3 decode_statement
        ../../gcc/fortran/parse.c:376
0x7f1c1a next_free
        ../../gcc/fortran/parse.c:1384
0x7f1c1a next_statement
        ../../gcc/fortran/parse.c:1616
0x7f333b parse_spec
        ../../gcc/fortran/parse.c:4151
0x7f610c parse_progunit
        ../../gcc/fortran/parse.c:6117
0x7f7891 gfc_parse_file()
        ../../gcc/fortran/parse.c:6658
0x84480f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

Reply via email to