aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 0c92980..2404024 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -520,9 +520,14 @@ symbol_table::remove_unreachable_nodes (FILE *file)
reliably. */
if (node->alias || node->thunk.thunk_p)
;
- else if (!body_needed_for_clonning.contains (node->decl)
- && !node->alias && !node->thunk.thunk_p)
- node->release_body ();
+ else if (!body_needed_for_clonning.contains (node->decl))
+ {
+ /* Make the node a non-clone so that we do not attempt to
+ materialize it later. */
+ if (node->clone_of)
+ node->remove_from_clone_tree ();
+ node->release_body ();
+ }
else if (!node->clone_of)
gcc_assert (in_lto_p || DECL_RESULT (node->decl));
if (node->definition && !node->alias && !node->thunk.thunk_p)