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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> 
2012-09-11 10:38:32 UTC ---
On Tue, 11 Sep 2012, hubicka at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54534
> 
> --- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-09-11 
> 10:19:04 UTC ---
> Well, the patch really is quite symptomatic - i.e. dwarf2out should not forget
> about the decl when it is removed from varpool.
> 
> The way things are supposed to work (I believe) is to call global_decl debug
> hook via emit_debug_global_declarations that is called from frontend at global
> decl wrapup time (i.e. the thing that is executed after whole compilation and
> should not be frontend specific :)
> 
> I made some cleanups in this area as part of symtab work, but I do not see how
> those should affect the debug output...

The regression is that it prints <optimized_out> which it really is.
But at -O0 we don't IMHO want unused decls to go away.  Not sure why
it doesn't regress on trunk - somehow the decl is output anyway.

Richard.

Reply via email to