PR ipa/61548
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Feb 2015 03:57:32 +0000 (03:57 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 Feb 2015 03:57:32 +0000 (03:57 +0000)
* varpool.c (varpool_node::remove): Fix order of variables.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220432 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varpool.c

index fa6a7e8..6c19064 100644 (file)
@@ -1,5 +1,10 @@
 2015-02-04  Jan Hubicka  <hubicka@ucw.cz>
 
+       PR ipa/61548
+       * varpool.c (varpool_node::remove): Fix order of variables.
+
+2015-02-04  Jan Hubicka  <hubicka@ucw.cz>
+
        PR ipa/64686
        * ipa-inline.c (inline_small_functions): Fix ordering issue between
        speculation resolution and key updates.
index 3bd6eb4..49a9213 100644 (file)
@@ -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);
 }