https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65305
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.org --- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- It looks like we can now have cgraph_edge with null call_stmt so: Index: tree-sra.c =================================================================== --- tree-sra.c (revision 221159) +++ tree-sra.c (working copy) @@ -5036,6 +5036,8 @@ ipa_sra_check_caller (struct cgraph_node for (cgraph_edge *cs = node->callers; cs; cs = cs->next_caller) { gimple call_stmt = cs->call_stmt; + if (!call_stmt) + continue; unsigned count = gimple_call_num_args (call_stmt); for (unsigned i = 0; i < count; i++) { is very likely the way to go.