On 11/14/18 8:08 AM, Nathan Sidwell wrote:
> On 11/14/18 7:33 AM, Richard Biener wrote:
> 
>> Hmm, there is reference_to_unused () used in a related case.  But generally
>>
>> for late emission such references are "OK" and expected to be pruned
>> later by resolve_addr () (which I see we do not call for type units?!).  
>> Quote:
>>
>>
>> /* Resolve DW_OP_addr and DW_AT_const_value CONST_STRING arguments to
>>     an address in .rodata section if the string literal is emitted there,
>>     or remove the containing location list or replace DW_AT_const_value
>>     with DW_AT_location and empty location expression, if it isn't found
>>     in .rodata.  Similarly for SYMBOL_REFs, keep only those that refer
>>     to something that has been emitted in the current CU.  */
>>
>> static void
>> resolve_addr (dw_die_ref die)
>> {
> 
> That does seem to work.  The attached survise bootstrapping on
> x86_64-linux, ok?
> 
> nathan
> 
> -- 
> Nathan Sidwell
> 
> pr88006-2.diff
> 
> 2018-11-14  Nathan Sidwell  <nat...@acm.org>
> 
>       PR debug/88006
>       PR debug/87462
>       * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
>       type list.
> 
>       * g++.dg/debug/dwarf2/pr87462.C: New.
>       * g++.dg/debug/dwarf2/pr88006.C: New.
OK
jeff

Reply via email to