Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

Jan Hubicka
Sun Jun 12 22:11:00 GMT 2011

this patch solves the bultin/strlen-3.c LTO linker plugin problem.
While removing alias code I was bit overactive and removed the check that makes us to implicitly
do -fwhole-program when resolution info is around.

It is not quite clear to me why in LTO we need -fwhole-program to get the testcase right.
Bootstrap/regtest in progress, will commit it once it passes.

        * ipa.c (cgraph_exernally_visible_p): Return accidentally removed check
Index: ipa.c
--- ipa.c       (revision 174955)
+++ ipa.c       (working copy)
@@ -614,6 +614,8 @@
   /* If linker counts on us, we must preserve the function.  */
   if (cgraph_used_from_object_file_p (node))
     return true;
+  if (node->resolution == LDPR_PREVAILING_DEF_IRONLY)
+    return false;
   if (DECL_PRESERVE_P (node->decl))
     return true;
   if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (node->decl)))

More information about the Gcc-patches mailing list