On Thu, Feb 25, 2016 at 05:46:40PM +0100, Jakub Jelinek wrote: > On Thu, Feb 25, 2016 at 04:53:58PM +0100, Pierre-Marie de Rodat wrote: > > I introduced a DW_OP_call* traversal for this: > > > > * prune_unused_types_mark traverses attributes using > > prune_unused_types_walk_attribs; > > > > * …_walk_attribs walks location descriptions and location lists using > > …_walk_loc_descr > > > > * …_walk_loc_descr marks DWARF procedures referenced by DW_OP_call* > > operations. > > Ah, I've been looking for something that would set die_perennial_p, but > actually you just set die_mark later on instead for those. > So IMHO the right fix is just handle all the ops that could directly or > indirectly contain references to other DIEs, rather than just handling > the 3 you have there. > > Going to bootstrap/regtest this on x86_64-linux and i686-linux now. > > Is this ok for trunk if it passes testing?
Successfully bootstrapped/regtested on x86_64-linux and i686-linux. > 2016-02-25 Jakub Jelinek <ja...@redhat.com> > > PR debug/69947 > * dwarf2out.c (prune_unused_types_walk_loc_descr): Handle > all other ops that have dw_val_class_die_ref operands, > and DW_OP_GNU_entry_value. > > * gcc.dg/guality/pr69947.c: New test. Jakub