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

            Bug ID: 101102
           Summary: ICE in propagate_necessity, at tree-ssa-dce.c:980
           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
   type t
      real :: a
   end type
   type(t) :: x[*]
   data x /t(2.0+a)/
   dimension :: a(2)
end


$ gfortran-12-20210613 -c z1.f90 -fcoarray=single
z1.f90:6:13:

    6 |    data x /t(2.0+a)/
      |             1
Error: non-constant initialization expression at (1)


$ gfortran-12-20210613 -c z1.f90 -fcoarray=lib -O1
during GIMPLE pass: cddce
z1.f90:8:3:

    8 | end
      |   ^
internal compiler error: in propagate_necessity, at tree-ssa-dce.c:980
0xd7022b propagate_necessity
        ../../gcc/tree-ssa-dce.c:980
0xd71056 perform_tree_ssa_dce
        ../../gcc/tree-ssa-dce.c:1673
0xd72475 tree_ssa_cd_dce
        ../../gcc/tree-ssa-dce.c:1717
0xd72475 execute
        ../../gcc/tree-ssa-dce.c:1789

---

z1.f90:1:9:

    1 | program p
      |         ^
Error: type mismatch in binary expression
real(kind=4)

real(kind=4)[2]

real(kind=4)

_5 = a + 2.0e+0;
z1.f90:1:9: internal compiler error: 'verify_gimple' failed
0xe64aad verify_gimple_in_seq(gimple*)
        ../../gcc/tree-cfg.c:5161
0xb1f5d1 gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.c:15407
0xb1f877 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.c:15478
0xedd360 gimplify_all_functions
        ../../gcc/tree-nested.c:3672
0xedd34f gimplify_all_functions
        ../../gcc/tree-nested.c:3676
0xee56c0 lower_nested_functions(tree_node*)
        ../../gcc/tree-nested.c:3693
0x94df9a cgraph_node::analyze()
        ../../gcc/cgraphunit.c:676
0x951436 analyze_functions
        ../../gcc/cgraphunit.c:1234
0x95262d symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.c:2508

Reply via email to