public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7933] Fix overvactive check in cgraph_node::release_body
@ 2021-03-31 18:10 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-03-31 18:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:23ce9945d5efa77c96161443f68e03664705ada3
commit r11-7933-g23ce9945d5efa77c96161443f68e03664705ada3
Author: Jan Hubicka <jh@suse.cz>
Date: Wed Mar 31 20:10:31 2021 +0200
Fix overvactive check in cgraph_node::release_body
gcc/ChangeLog:
PR lto/99447
* cgraph.c (cgraph_node::release_body): Fix overactive check.
Diff:
---
gcc/cgraph.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index b77c676a58a..d7c78d518bc 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1860,7 +1860,15 @@ cgraph_node::release_body (bool keep_arguments)
lto_free_function_in_decl_state_for_node (this);
lto_file_data = NULL;
}
- gcc_assert (!clones);
+ if (flag_checking && clones)
+ {
+ /* It is invalid to release body before materializing clones except
+ for thunks that don't really need a body. Verify also that we do
+ not leak pointers to the call statements. */
+ for (cgraph_node *node = clones; node;
+ node = node->next_sibling_clone)
+ gcc_assert (node->thunk && !node->callees->call_stmt);
+ }
remove_callees ();
remove_all_references ();
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-31 18:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 18:10 [gcc r11-7933] Fix overvactive check in cgraph_node::release_body Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).