[Bug target/63892] [5 Regression] gcc.dg/sibcall-3.c fails on darwin with -m32
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 22 13:10:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63892
--- Comment #18 from Iain Sandoe <iains at gcc dot gnu.org> ---
so - next increment - simplification of the previous.
(don't try to redirect callers if we don't have any)
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index e1af8bf..ca19967 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -660,7 +660,8 @@ sem_function::merge (sem_item *alias_item)
/* When both alias and original are not overwritable, we can save
the extra thunk wrapper for direct calls. */
redirect_callers
- = (!original_discardable
+ = (alias->callers
+ && !original_discardable
&& !DECL_COMDAT_GROUP (alias->decl)
&& alias->get_availability () > AVAIL_INTERPOSABLE
&& original->get_availability () > AVAIL_INTERPOSABLE
Unfortunately, we're still not there.
I think that we can have a situation where we remove an alias which happens to
be the version that the vtable is pointing to (and so end up with an
unsatisfied reference from the vtable and link time).
However, I still haven't figured out how to redirect those references…
More information about the Gcc-bugs
mailing list