https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99447
--- Comment #11 from Jan Hubicka <hubicka at ucw dot cz> --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99447 > > --- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> --- > So like this. > > diff --git a/gcc/cgraph.c b/gcc/cgraph.c > index 80140757d16..447d9a920f7 100644 > --- a/gcc/cgraph.c > +++ b/gcc/cgraph.c > @@ -1854,6 +1854,9 @@ cgraph_node::release_body (bool keep_arguments) > needed to emit debug info later. */ > if (!used_as_abstract_origin && DECL_INITIAL (decl)) > DECL_INITIAL (decl) = error_mark_node; > + /* Zap references to call stmts of our body. */ > + for (cgraph_edge *e = callees; e; e = e->next_callee) > + e->call_stmt = NULL; Looks good but will also need to warlk indirect calls. However I wonder in what situations it makes sense to release body but keep cgraph edges? Honza > release_function_body (decl); > if (lto_file_data) > { > > -- > You are receiving this mail because: > You are on the CC list for the bug.