OSDN Git Service

* lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 May 2011 14:15:17 +0000 (14:15 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 May 2011 14:15:17 +0000 (14:15 +0000)
of thunks.

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

gcc/ChangeLog
gcc/lto-symtab.c

index c416db5..86a288a 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-31  Jan Hubicka  <jh@suse.cz>
+
+       * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl
+       of thunks.
+
 2011-05-31  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/49235
index 8dc10e8..af8106d 100644 (file)
@@ -821,11 +821,15 @@ lto_symtab_merge_cgraph_nodes (void)
   htab_traverse (lto_symtab_identifiers, lto_symtab_merge_cgraph_nodes_1, NULL);
 
   for (node = cgraph_nodes; node; node = node->next)
-    for (alias = node->same_body; alias; alias = next)
-      {
-       next = alias->next;
-       alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias);
-      }
+    {
+      if (node->thunk.thunk_p)
+        node->thunk.alias = lto_symtab_prevailing_decl (node->thunk.alias);
+      for (alias = node->same_body; alias; alias = next)
+       {
+         next = alias->next;
+         alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias);
+       }
+    }
 }
 
 /* Given the decl DECL, return the prevailing decl with the same name. */