https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96690
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:7fe2cec41bb2ccb499b6b6c513e00da1a270370f commit r11-2834-g7fe2cec41bb2ccb499b6b6c513e00da1a270370f Author: Richard Biener <rguent...@suse.de> Date: Mon Aug 24 14:12:01 2020 +0200 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 <rguent...@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.