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

            Bug ID: 98353
           Summary: [9/10/11 Regression] ICE in propagate_necessity, at
                    tree-ssa-dce.c:1053
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to r6 :


$ cat z1.cc
template <int n> class A {};
template <class T> struct B {
  static const int n = 1;
  template <class> A <B<T>::n> f();
  _Complex double c[2], d = 1.0;
};
void g ()
{
  B<int>().f<int>();
}


$ g++-5 -c z1.cc -O2 -std=c++11
$
$ g++-11-20201213 -c z1.cc -O2
during GIMPLE pass: cddce
z1.cc: In function 'void g()':
z1.cc:10:1: internal compiler error: in propagate_necessity, at
tree-ssa-dce.c:1053
   10 | }
      | ^
0xd7fa5b propagate_necessity
        ../../gcc/tree-ssa-dce.c:1053
0xd80a91 perform_tree_ssa_dce
        ../../gcc/tree-ssa-dce.c:1747

---

z1.cc: In function 'void g()':
z1.cc:7:6: error: non-register as LHS of binary operation
    7 | void g ()
      |      ^
D.2410.c[D.2438] = COMPLEX_EXPR <(double) 0, (double) 0>;
z1.cc:7:6: internal compiler error: 'verify_gimple' failed
0xfd241d verify_gimple_in_seq(gimple*)
        ../../gcc/tree-cfg.c:5119
0xc97791 gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.c:15329
0xc97a47 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.c:15400
0xac81f7 cgraph_node::analyze()
        ../../gcc/cgraphunit.c:670
0xacb326 analyze_functions
        ../../gcc/cgraphunit.c:1235
0xacc4dd symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.c:2513

Reply via email to