http://sourceware.org/bugzilla/show_bug.cgi?id=13245

--- Comment #4 from hubicka at ucw dot cz 2011-10-02 10:48:55 UTC ---
> Sorry, it is because mainline still contains the hack for COMDAT handling (I
> diseabled it in my tree to verify that new IRONLY solution works).  You need 
> to
> extend the testcases to take address of the inline function  so the hack is
> ineffective.
Actually adding address would just convolute the testcase in a way that the
intended
optimization would be impossible (we can not unshare the two comdats since we
do not
know if the oher library takes address of test, too).

Probably easiest way to reproduce is to update to today tree (you need v2
plugin API
support I just comitted) and disable the comdat hack.  The problem hits without
comdat
hack, too (like is the case of Mozilla with -fprofile-generate) but it is more
difficult
to produce a testcase.

BTW I am starting to wonder by linker results in PREVAILING_DEF at all.  When I
know
Iam going to link with a shared library that exports the comdat, I can just
optimize
it out. So at least w/o LTO it would make sense for me if linker just preemted
it
to the dynamic linking then.

Honza

Index: lto-streamer-out.c
===================================================================
--- lto-streamer-out.c    (revision 179423)
+++ lto-streamer-out.c    (working copy)
@@ -1396,7 +1396,7 @@ produce_symtab (struct output_block *ob,
       if (DECL_EXTERNAL (node->decl))
     continue;
       if (DECL_COMDAT (node->decl)
-      && cgraph_comdat_can_be_unshared_p (node))
+      && cgraph_comdat_can_be_unshared_p (node) && 0)
     continue;
       if ((node->alias && !node->thunk.alias) || node->global.inlined_to)
     continue;
@@ -1408,7 +1408,7 @@ produce_symtab (struct output_block *ob,
       if (!DECL_EXTERNAL (node->decl))
     continue;
       if (DECL_COMDAT (node->decl)
-      && cgraph_comdat_can_be_unshared_p (node))
+      && cgraph_comdat_can_be_unshared_p (node) && 0)
     continue;
       if ((node->alias && !node->thunk.alias) || node->global.inlined_to)
     continue;
@@ -1427,7 +1427,7 @@ produce_symtab (struct output_block *ob,
       if (DECL_COMDAT (vnode->decl)
       && !vnode->force_output
       && vnode->finalized 
-      && DECL_VIRTUAL_P (vnode->decl))
+      && DECL_VIRTUAL_P (vnode->decl) && 0)
     continue;
       if (vnode->alias && !vnode->alias_of)
     continue;
@@ -1441,7 +1441,7 @@ produce_symtab (struct output_block *ob,
       if (DECL_COMDAT (vnode->decl)
       && !vnode->force_output
       && vnode->finalized 
-      && DECL_VIRTUAL_P (vnode->decl))
+      && DECL_VIRTUAL_P (vnode->decl) && 0)
     continue;
       if (vnode->alias && !vnode->alias_of)
     continue;

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to