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

            Bug ID: 91566
           Summary: [9/10 Regression] ICE in gfc_constructor_copy, at
                    fortran/constructor.c:103
           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: ---

Changed between 20180624 and 20180708 :


$ cat z1.f90
program p
   print *, -merge([3,4], 0, [.false.,.true.])
end


$ cat z2.f90
program p
   print *, 2 + merge([3,4], 0, [.false.,.true.])
end


$ gfortran-9-20180624 z1.f90 && ./a.out
           0          -4


$ gfortran-10-20190825 -c z1.f90
f951: internal compiler error: Segmentation fault
0xb3acef crash_signal
        ../../gcc/toplev.c:326
0x13f7bac splay_tree_foreach
        ../../libiberty/splay-tree.c:577
0x5fe5f4 gfc_constructor_copy(splay_tree_s*)
        ../../gcc/fortran/constructor.c:103
0x5e5cab reduce_unary
        ../../gcc/fortran/arith.c:1267
0x5e5ccf reduce_unary
        ../../gcc/fortran/arith.c:1270
0x5e651f eval_intrinsic
        ../../gcc/fortran/arith.c:1609
0x620307 simplify_intrinsic_op
        ../../gcc/fortran/expr.c:1180
0x620307 gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.c:2198
0x68d4e6 resolve_operator
        ../../gcc/fortran/resolve.c:4310
0x68d4e6 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6944
0x684e5b gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11416
0x694fbf gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10460
0x684fe9 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11406
0x687ca7 resolve_codes
        ../../gcc/fortran/resolve.c:16921
0x687d6e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:16956
0x67581c resolve_all_program_units
        ../../gcc/fortran/parse.c:6073
0x67581c gfc_parse_file()
        ../../gcc/fortran/parse.c:6320
0x6bf60f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to