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.

Reply via email to