public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/51663] LTO does not reclaim comdat-local statics
Date: Sat, 24 Mar 2012 21:13:00 -0000	[thread overview]
Message-ID: <bug-51663-4-8s9DrTVdn3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51663-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-03-24 21:07:34 UTC ---

The resolution info seems to be right, unlike the aforementioned comment.
d: availability:overwritable (asm: _ZZN1C1mEvE1d) needed analyzed finalized
externally_visible prevailing_def_ironly

The reason why it stays in the code is again the logic of promoting it to
static var and consequentely not removing the variable at -O0.  I wonder what
policy we want here.

I think some folks still rely on static vars not being removed at -O0. We
probably could remove local statics of functions that has been removed, but
that is an odd rule.  

Perhaps we may want to set flag forcing static vars in the code at -O0 instead
of testing the flag late.  (effectively making -O0 to drop implicit used flag
on everything). This way the behaviour will be consistet over -fwhole-program
and not.


  parent reply	other threads:[~2012-03-24 21:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23 11:24 [Bug lto/51663] New: " rguenth at gcc dot gnu.org
2012-01-04 12:50 ` [Bug lto/51663] " rguenth at gcc dot gnu.org
2012-01-04 12:54 ` rguenth at gcc dot gnu.org
2012-02-29 15:58 ` hubicka at gcc dot gnu.org
2012-03-20 16:52 ` hubicka at gcc dot gnu.org
2012-03-24 21:08 ` hubicka at gcc dot gnu.org
2012-03-24 21:13 ` hubicka at gcc dot gnu.org [this message]
2012-03-24 22:08 ` hubicka at gcc dot gnu.org
2012-03-25 13:40 ` hubicka at gcc dot gnu.org
2012-03-25 13:52 ` hubicka at gcc dot gnu.org
2012-03-26  7:07 ` [Bug middle-end/51663] Desirable/undesirable elimination of unused variables & functions at -O0, -O0 -flto and -O0 -fwhole-program rguenth at gcc dot gnu.org
2012-03-26 10:49 ` hubicka at ucw dot cz
2020-03-17  9:42 ` vries at gcc dot gnu.org
2020-03-17 10:33 ` rguenth at gcc dot gnu.org
2020-03-17 10:50 ` vries at gcc dot gnu.org
2020-03-17 12:16 ` rguenth at gcc dot gnu.org
2020-03-17 12:18 ` rguenth at gcc dot gnu.org

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-51663-4-8s9DrTVdn3@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).