https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82128
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Hmm, causes Running /tmp/trunk/gcc/testsuite/g++.dg/dg.exp ... FAIL: g++.dg/ipa/pr65263.C -std=gnu++98 (internal compiler error) FAIL: g++.dg/ipa/pr65263.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/ipa/pr65263.C -std=gnu++11 (internal compiler error) FAIL: g++.dg/ipa/pr65263.C -std=gnu++11 (test for excess errors) FAIL: g++.dg/ipa/pr65263.C -std=gnu++14 (internal compiler error) FAIL: g++.dg/ipa/pr65263.C -std=gnu++14 (test for excess errors) === g++ Summary === # of unexpected failures 6 /tmp/trunk/gcc/testsuite/g++.dg/ipa/pr65263.C: In member function 'int D::F::operator()() const':^M /tmp/trunk/gcc/testsuite/g++.dg/ipa/pr65263.C:42:5: internal compiler error: Segmentation fault^M 0x11cea13 crash_signal^M /tmp/trunk/gcc/toplev.c:341^M 0xc6da67 compute_call_stmt_bb_frequency(tree_node*, basic_block_def*)^M /tmp/trunk/gcc/cgraphbuild.c:195^M 0xc677e4 cgraph_node::verify_node()^M /tmp/trunk/gcc/cgraph.c:3244^M 0xc564a9 symtab_node::verify()^M /tmp/trunk/gcc/symtab.c:1204^M where a callgraph edge references a removed stmt (the folded call). Because static void cgraph_update_edges_for_call_stmt_node (cgraph_node *node, gimple *old_stmt, tree old_call, gimple *new_stmt) { tree new_call = (new_stmt && is_gimple_call (new_stmt)) ? gimple_call_fndecl (new_stmt) : 0; /* We are seeing indirect calls, then there is nothing to update. */ if (!new_call && !old_call) return; we turned an indirect call into a non-call (the LHS effect of it after a __builtin_unreachable ()). Testing an updated patch.