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

            Bug ID: 106049
           Summary: ICE in gfc_simplify_pack, at fortran/simplify.cc:6481
           Product: gcc
           Version: 13.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
   type t
   end type
   type(t), parameter :: a = [t ::]
   type(t), parameter :: b(1,1) = a
   type(t) :: c(1) = pack(reshape(b, [1]), [.true.])
end


$ gfortran-13-20220619 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcd90df crash_signal
        ../../gcc/toplev.cc:322
0x7929dd gfc_simplify_pack(gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.cc:6481
0x70f64a do_simplify
        ../../gcc/fortran/intrinsic.cc:4677
0x71a52a gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.cc:5056
0x76f068 resolve_unknown_f
        ../../gcc/fortran/resolve.cc:2990
0x76f068 resolve_function
        ../../gcc/fortran/resolve.cc:3347
0x76f068 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7187
0x6ff504 gfc_reduce_init_expr(gfc_expr*)
        ../../gcc/fortran/expr.cc:3163
0x702490 gfc_match_init_expr(gfc_expr**)
        ../../gcc/fortran/expr.cc:3211
0x6ec7d4 variable_decl
        ../../gcc/fortran/decl.cc:3004
0x6ec7d4 gfc_match_data_decl()
        ../../gcc/fortran/decl.cc:6299
0x757583 match_word
        ../../gcc/fortran/parse.cc:67
0x757583 decode_statement
        ../../gcc/fortran/parse.cc:378
0x758fca next_free
        ../../gcc/fortran/parse.cc:1397
0x758fca next_statement
        ../../gcc/fortran/parse.cc:1629
0x75a55b parse_spec
        ../../gcc/fortran/parse.cc:4168
0x75d6fc parse_progunit
        ../../gcc/fortran/parse.cc:6210
0x75edc1 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6755
0x7acb6f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

Reply via email to