https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65595
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> --- Hi, the ICE does not reproduce for me, but from backtrace it seems quite clear that the following fix should work: Index: cgraph.c =================================================================== --- cgraph.c (revision 221707) +++ cgraph.c (working copy) @@ -1516,7 +1516,7 @@ cgraph_update_edges_for_call_stmt_node ( if (e) { /* Keep calls marked as dead dead. */ - if (e->callee + if (new_call && e->callee && DECL_BUILT_IN_CLASS (e->callee->decl) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (e->callee->decl) == BUILT_IN_UNREACHABLE) { It is late here, so I will return to it only at morning. If the patch fixes the ICE and passes testing, please just go ahead and commit it. Honza