On Fri, 7 Dec 2012, Jakub Jelinek wrote: > On Fri, Dec 07, 2012 at 12:23:03PM +0100, Richard Biener wrote: > > > That would still mean we can fail bootstrap with -O2 -g1, if there is a > > > DEBUG_IMPLICIT_PTR created during RTL expansion to some unused var, then > > > that var's varpool node is varpool_remove_node removed and initializer > > > cleared, and dwarf2out_finish would want to make_decl_rtl_for_debug again. > > > > "fail"? Well, dwarf2out_finish definitely has to care for no initializer > > being in-place. Does it somehow record that it was present somewhen > > early and is confused later when it got dropped? If so, why not always > > decide late if there is an initializer? > > How? During expansion to create DEBUG_IMPLICIT_PTR argument, we need some > RTL for the vars (and can't make it using make_decl_rtl, as that would > affect code generation). So, we use make_decl_rtl_for_debug that doesn't > remember the RTL, but still it does all the processing make_decl_rtl > normally does. bss_initializer_p is called deeply from that somewhere. > As I said in the PR/initial mail, the other option would be to come up with > some other special value for this DECL_INITIAL has been forgotten, but > it wasn't bss_initializer_p. But that seems to be lots of work for very > little gain (rarely used -g1).
Hmm. Then make it DINFO_LEVEL_NONE and put in a fixme comment refering to the bugreport. Richard.