https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78049
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- static void fixup_call_stmt_edges_1 (struct cgraph_node *node, gimple **stmts, struct function *fn) { struct cgraph_edge *cedge; struct ipa_ref *ref = NULL; unsigned int i; for (cedge = node->callees; cedge; cedge = cedge->next_callee) { if (gimple_stmt_max_uid (fn) < cedge->lto_stmt_uid) fatal_error (input_location, "Cgraph edge statement index out of range"); 901 cedge->call_stmt = as_a <gcall *> (stmts[cedge->lto_stmt_uid - 1]); if (!cedge->call_stmt) so it looks like cedge->lto_stmt_uid is out of bounds or out-of-sync.