public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix lto decl merging of thunks
@ 2011-05-31 16:10 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2011-05-31 16:10 UTC (permalink / raw)
  To: gcc-patches

Hi,
while updating thunks to not be same body alises I missed this spot that merges
alias decl.

Bootstrapped/regtested x86_64-linux, comitted.

2011-05-31  Jan Hubicka  <jh@suse.cz>

	* lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl
	of thunks.

Index: lto-symtab.c
===================================================================
--- lto-symtab.c	(revision 174393)
+++ lto-symtab.c	(working copy)
@@ -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. */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-31 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 16:10 Fix lto decl merging of thunks 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).