This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/53831] [4.7/4.8 Regression] Virtuals missing in LTO symtab
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Oct 2012 14:50:27 +0000
- Subject: [Bug lto/53831] [4.7/4.8 Regression] Virtuals missing in LTO symtab
- Auto-submitted: auto-generated
- References: <bug-53831-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53831
--- Comment #25 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-10-06 14:50:27 UTC ---
What you hit here is the V1 linker plugin API hack. We, for purpose, hide
COMDAT objects when we know we can hide them, because otherwise linker will
assign them PREVAILING and we will be forced to output them even if they are
otherwise unused. This kills code quality and breaks some C++ apps.
Plugin API is underspecfied as what symbols you can create without being asked
for. Obviously one need to create ones to get WHOPR work. I would agree with
comment #4 that linker should survive introduction of the COMDAT.
I am not sure if the testcase is invalid - it should include the definition of
the function IMO. But without giving up on V1 API we can not fix that. I am
going to commit that to 4.8, so that will leave it 4.7 regression (or
non-regression) only.
We discussed it couple times - there is way to get this working with V2 linker
while still supporting hack for V1 API. It requires moving the whole logic into
plugin and I am not sure it is worth the effort for 4.7 alone.