https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97660
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> --- The call statement being looked at by cgraph_edge::redirect_call_stmt_to_callee is: # .MEM = VDEF <.MEM> _47 = __sync_val_compare_and_swap_8 (ptr_45, 0, new_node.0_46); cgraph_node::get returns NULL on the __sync_val_compare_and_swap_8 decl at cgraph.c:1494 This looks like it is expected to happen, given that the assert on the following line used to be `gcc_assert (!node || !node->clone.param_adjustments);`. The change that causes the segfault is: if (flag_checking && decl) { cgraph_node *node = cgraph_node::get (decl); - gcc_assert (!node || !node->clone.param_adjustments); + clone_info *info = clone_info::get (node); + gcc_assert (!node || !info || !info->param_adjustments); }