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

            Bug ID: 91801
           Summary: ICE in gfc_simplify_reshape, at
                    fortran/simplify.c:6733
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Follow-up of pr91565,
using order with values < 1 or > n (with n = size of SHAPE).


$ cat z1.f90
program p
   integer, parameter :: a(2) = [2,0]
   print *, reshape([1,2,3,4,5,6], [2,3], order=a)
end


$ cat z2.f90
program p
   integer, parameter :: a(2) = [2,3]
   print *, reshape([1,2,3,4,5,6], [2,3], order=a)
end


$ gfortran-10-20190915 -c z1.f90
f951: internal compiler error: in gfc_simplify_reshape, at
fortran/simplify.c:6733
0x6a8eae gfc_simplify_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.c:6733
0x62fdcb do_simplify
        ../../gcc/fortran/intrinsic.c:4566
0x63a45e gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.c:4941
0x691c41 resolve_unknown_f
        ../../gcc/fortran/resolve.c:2894
0x691c41 resolve_function
        ../../gcc/fortran/resolve.c:3231
0x68e065 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6952
0x68784c gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6919
0x68784c gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11594
0x6964bf gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10638
0x686628 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11584
0x688ed7 resolve_codes
        ../../gcc/fortran/resolve.c:17105
0x688f9e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17140
0x6774ac resolve_all_program_units
        ../../gcc/fortran/parse.c:6193
0x6774ac gfc_parse_file()
        ../../gcc/fortran/parse.c:6440
0x6c1a0f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to