public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/53831] Inline virtuals missing in LTO symtab
Date: Tue, 03 Jul 2012 11:00:00 -0000	[thread overview]
Message-ID: <bug-53831-4-OVSVJlCstn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53831-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-03 10:59:57 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > I don't think linker can do much after gcc removes the symbol from symtab.
> 
> I belive the contract between the linker and GCC is that GCC can introduce
> new references to externally visible symbols and remove references and
> defs of symbols that are only used from inside the executable (the linker
> tells GCC that fact).  The question is who is at fault here - GCC doing
> something it may not do or the linker not handling a situation it should
> handle.

That is, the linker tells us (-v -save-temps, grab the -fresolution= filename
from the lto1 -fwpa invocation):

repro> cat -- -lm.res
2
main.o 4
208 7b62d4c061a2d132 PREVAILING_DEF main
193 7b62d4c061a2d132 RESOLVED_IR _ZN1C1gEv
204 7b62d4c061a2d132 UNDEF _ZN1C1fEv
180 7b62d4c061a2d132 RESOLVED_IR _ZTV1C
libdummy.a@0xbc 2
164 84325c9d3f031d4d PREVAILING_DEF_IRONLY _ZN1C1gEv
184 84325c9d3f031d4d PREVAILING_DEF_IRONLY _ZTV1C

so _ZN1C1gEv is not referenced from outside the link target.  So GCC
removes it and (hopefully!) all references.  And I cannot see any
references to _ZN1C1gEv in the final assembler file, but only the
version that was brought local (_ZN1C1gEv.2356 in my case).

So it does look like a linker issue after all.


  parent reply	other threads:[~2012-07-03 11:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02 19:50 [Bug lto/53831] New: " tetra2005 at gmail dot com
2012-07-02 19:52 ` [Bug lto/53831] " tetra2005 at gmail dot com
2012-07-03 10:32 ` rguenth at gcc dot gnu.org
2012-07-03 10:45 ` tetra2005 at gmail dot com
2012-07-03 10:52 ` rguenth at gcc dot gnu.org
2012-07-03 11:00 ` rguenth at gcc dot gnu.org [this message]
2012-07-03 12:16 ` tetra2005 at gmail dot com
2012-07-03 12:40 ` rguenth at gcc dot gnu.org
2012-07-03 12:46 ` rguenth at gcc dot gnu.org
2012-07-03 12:54 ` rguenth at gcc dot gnu.org
2012-07-03 12:59 ` tetra2005 at gmail dot com
2012-07-03 13:12 ` rguenth at gcc dot gnu.org
2012-07-03 13:17 ` rguenth at gcc dot gnu.org
2012-07-03 13:19 ` [Bug lto/53831] [4.7/4.8 Regression] Virtuals " rguenth at gcc dot gnu.org
2012-07-03 13:20 ` hubicka at gcc dot gnu.org
2012-07-03 13:31 ` tetra2005 at gmail dot com
2012-07-03 13:39 ` markus at trippelsdorf dot de
2012-07-03 13:46 ` markus at trippelsdorf dot de
2012-07-03 14:10 ` rguenth at gcc dot gnu.org
2012-07-03 14:13 ` rguenth at gcc dot gnu.org
2012-07-03 16:55 ` tetra2005 at gmail dot com
2012-07-04  9:28 ` rguenth at gcc dot gnu.org
2012-07-04 12:25 ` andi-gcc at firstfloor dot org
2012-07-04 12:32 ` tetra2005 at gmail dot com
2012-07-10 15:34 ` tetra2005 at gmail dot com
2012-09-20 10:20 ` jakub at gcc dot gnu.org
2012-10-06 14:51 ` hubicka at gcc dot gnu.org
2012-10-06 15:30 ` hubicka at gcc dot gnu.org
2012-10-06 16:06 ` markus at trippelsdorf dot de
2012-10-06 16:21 ` hubicka at ucw dot cz
2012-10-06 17:31 ` hubicka at gcc dot gnu.org
2012-12-06 16:24 ` rguenth at gcc dot gnu.org
2013-01-09 21:41 ` [Bug lto/53831] [4.7 " hubicka at gcc dot gnu.org
2013-04-11  7:59 ` rguenth at gcc dot gnu.org
2014-05-19 15:59 ` trippels at gcc dot gnu.org
2014-05-19 16:18 ` hvtaifwkbgefbaei at gmail dot com
2014-06-12 13:14 ` rguenth at gcc dot gnu.org
2014-12-19 22:46 ` htl10 at users dot sourceforge.net
2014-12-19 22:49 ` htl10 at users dot sourceforge.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53831-4-OVSVJlCstn@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).