aboutsummaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 3bd6eb4..49a9213 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -195,7 +195,6 @@ void
varpool_node::remove (void)
{
symtab->call_varpool_removal_hooks (this);
- unregister ();
/* When streaming we can have multiple nodes associated with decl. */
if (symtab->state == LTO_STREAMING)
@@ -205,6 +204,8 @@ varpool_node::remove (void)
else if (DECL_INITIAL (decl) && DECL_INITIAL (decl) != error_mark_node
&& !ctor_useable_for_folding_p ())
remove_initializer ();
+
+ unregister ();
ggc_free (this);
}