Patchwork Cgraph alias reorg 16/14 (fix latent bug in ipa.c)

login
register
mail settings
Submitter Jan Hubicka
Date June 11, 2011, 2:19 p.m.
Message ID <20110611141917.GA3871@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/100010/
State New
Headers show

Comments

Jan Hubicka - June 11, 2011, 2:19 p.m.
Hi,
there is typo in cgraph_comdat_can_be_unshared_p that causes us to sometimes diverge in visibility
of the single comdat group that leads to undefined symbols in Mozlla.
Fixed thus.

Bootstrapped/regtested x86_64-linux, comitted.

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 174952)
+++ ChangeLog	(working copy)
@@ -1,5 +1,9 @@ 
 2011-06-11  Jan Hubicka  <jh@suse.cz>
 
+	* ipa.c (cgraph_comdat_can_be_unshared_p): Fix pasto.
+
+2011-06-11  Jan Hubicka  <jh@suse.cz>
+
 	* lto-symtab.c (lto_cgraph_replace_node): Kill same body alias code.
 	(lto_symtab_resolve_can_prevail_p): Likewise.
 	(lto_symtab_merge_cgraph_nodes): Update merging of aliases.
Index: ipa.c
===================================================================
--- ipa.c	(revision 174952)
+++ ipa.c	(working copy)
@@ -571,7 +571,7 @@  cgraph_comdat_can_be_unshared_p (struct 
          address taken.  */
       for (next = node->same_comdat_group;
 	   next != node; next = next->same_comdat_group)
-	if (cgraph_address_taken_from_non_vtable_p (node)
+	if (cgraph_address_taken_from_non_vtable_p (next)
 	    && !DECL_VIRTUAL_P (next->decl))
 	  return false;
     }