This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/47497] [4.6 Regression] SPEC CPU 2006 failed to link with LTO -fuse-linker-plugin -fwhole-program


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47497

--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-02-26 14:32:42 UTC ---
The problem is in the alias merging code in lto-symtab. It does:
alias->thunk.alias = prevailing_node->decl;
that is wrong for thunks, as for thunks pointing to thunk (like this one) the
alias is not the decl of function thunk is associated for but decl of thunk.

Fixing this problem however leads to futher problems (ICE at ltrans streaming
in time, because we merge aliases incorrectly...)

I don't think the aliases should be merged actually, just the aliases
associated with prevailed decl removed. thunk.alias should always point to the
prevailing decl, but I guess if we just drop aliases from other definitions
this should just work.

Jakub, what was logic for the current alias merging code?

The problem in soplex is that function in question is comdat and it has two
actual definitions. With decl merging we mix together local label for thunk
from the first definition with local label for the thunk from second
definition.
It bit surprises me how this happens, given that the aliases should match and
we should consistently choose one or another.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]