debug/96690 - mangle symbols eventually used by late dwarf output
authorRichard Biener <rguenther@suse.de>
Mon, 24 Aug 2020 12:12:01 +0000 (14:12 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 25 Aug 2020 07:05:48 +0000 (09:05 +0200)
commit7fe2cec41bb2ccb499b6b6c513e00da1a270370f
treea3df54dbc1712e0ceccad89cf9700bc5d81448f6
parent108477875f01798eecd7780207396b8c44930ae9
debug/96690 - mangle symbols eventually used by late dwarf output

The following makes sure to, at early debug generation time, mangle
symbols we eventually end up outputting during late finish.

2020-08-24  Richard Biener  <rguenther@suse.de>

PR debug/96690
* dwarf2out.c (reference_to_unused): Make FUNCTION_DECL
processing more consistent with respect to
symtab->global_info_ready.
(tree_add_const_value_attribute): Unconditionally call
rtl_for_decl_init to do all mangling early but throw
away the result if early_dwarf.

* g++.dg/lto/pr96690_0.C: New testcase.
gcc/dwarf2out.c
gcc/testsuite/g++.dg/lto/pr96690_0.C [new file with mode: 0644]