https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85656
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |WAITING --- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #5) > > --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- > [...] > > According to log file alias support is mission on solaris. Thus following > > patch > > should fix that by skipping the test: > > > > diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c > > b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c > > index 85531ab1cf3..45525844551 100644 > > --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c > > +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c > > @@ -1,4 +1,5 @@ > > /* { dg-do link } */ > > +/* { dg-require-alias "" } */ > > /* { dg-options "-O2 -fdump-ipa-icf -flto -fdump-tree-fixup_cfg4" } */ > > /* { dg-require-effective-target lto } */ > > /* { dg-additional-sources "ipa-icf-38a.c" }*/ > > > > Can you please verify that? > > The patch doesn't make a difference as Solaris *does* support attribute > alias, even when using as and ld. However, I noticed that the > unmodified test PASSes when using gas/gld instead, so there is a > toolchain difference that causes this failure. So can you please debug why we go into following branch: 1277 if (!create_wrapper 1278 && !alias->call_for_symbol_and_aliases (cgraph_node::has_thunk_p, 1279 NULL, true) 1280 && !alias->can_remove_if_no_direct_calls_p ()) 1281 { 1282 if (dump_file) 1283 fprintf (dump_file, "Not unifying; can not make wrapper and " 1284 "function has other uses than direct calls\n\n"); 1285 return false; 1286 } I'm curious why can_remove_if_no_direct_calls_p returns false.