https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87124
Bug ID: 87124 Summary: [9 Regression] ICE have integer_cst in SSA_VAL, at tree-ssa-sccvn.c:462 while building 541.leela_r from SPEC2017 Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ktkachov at gcc dot gnu.org Target Milestone: --- class A { int m_fn1(); }; int A::m_fn1() { A *a = this; for (int i; i && a;) a = 0; } ICEs on aarch64 with -O2 SGFTree.ii:8:1: internal compiler error: tree check: expected ssa_name, have integer_cst in SSA_VAL, at tree-ssa-sccvn.c:462 0x62d6e5 tree_check_failed(tree_node const*, char const*, int, char const*, ...) $SRC/gcc/tree.c:9371 0x1018d87 tree_check(tree_node*, char const*, int, char const*, tree_code) $SRC/gcc/tree.h:3106 0x1018d87 SSA_VAL(tree_node*) $SRC/gcc/tree-ssa-sccvn.c:462 0x100592b rpo_elim::eliminate_avail(basic_block_def*, tree_node*) $SRC/gcc/tree-ssa-sccvn.c:5690 0x1009db5 vn_lookup_simplify_result $SRC/gcc/tree-ssa-sccvn.c:5673 0xb5ec75 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) $SRC/gcc/gimple-fold.c:6098 0x1013c83 try_to_simplify $SRC/gcc/tree-ssa-sccvn.c:4225 0x1013c83 visit_stmt $SRC/gcc/tree-ssa-sccvn.c:4268 0x10157fb process_bb $SRC/gcc/tree-ssa-sccvn.c:5984 0x1017466 do_rpo_vn $SRC/gcc/tree-ssa-sccvn.c:6408 0x101833c execute $SRC/gcc/tree-ssa-sccvn.c:6597 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. This is reduced from 541.leela_r from SPEC2017. Apologies is this is a duplicate of recently fixed sscvn bugs, I couldn't find an exact duplicate of the backtrace