diff mbox

Prevent inliner from removing aliases of used comdats

Message ID 20110913140421.GD13389@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Sept. 13, 2011, 2:04 p.m. UTC
Hi,
can_remove_node_now_p has two thikos in it that makes it to remove aliases of comdats that eventually may lead to unresolved symbols.
Fixed thus.

Bootstrapped/regtested x86_64-linux, comitted.
Honza

Comments

Graham Stott Sept. 13, 2011, 5:51 p.m. UTC | #1
Jan,

Any testcase do can add?

Graham
Jan Hubicka Sept. 14, 2011, 8:49 a.m. UTC | #2
> Jan,
> 
> Any testcase do can add?

Sadly not really - in both cases (openoffice and mozilla) the modules involved are too large for testsuite.
I tried to delta it but didn't get anything useful (about 100k of C++)

Honza
> 
> Graham
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 178808)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2011-09-13  Jan Hubicka  <jh@suse.cz>
+
+	PR other/49533
+	* ipa-inline-transform.c (can_remove_node_now_p): Fix thunkos.
+
 2011-09-13  Paul Brook  <paul@codesourcery.com>
  
 	* config/arm/arm.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c	(revision 178808)
+++ ipa-inline-transform.c	(working copy)
@@ -120,8 +120,8 @@  can_remove_node_now_p (struct cgraph_nod
     return true;
   for (next = node->same_comdat_group;
        next != node; next = next->same_comdat_group)
-    if (node->callers && node->callers != e
-	&& !can_remove_node_now_p_1 (node))
+    if ((next->callers && next->callers != e)
+	|| !can_remove_node_now_p_1 (next))
       return false;
   return true;
 }