https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67664
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Mon Sep 21 14:02:27 2015 New Revision: 227972 URL: https://gcc.gnu.org/viewcvs?rev=227972&root=gcc&view=rev Log: 2015-09-21 Richard Biener <rguent...@suse.de> PR debug/67664 * dwarf2out.c (add_location_or_const_value_attribute): Remove attribute parameter. Early exit if either DW_AT_const_value or DW_AT_location are present already. (gen_variable_die): Adjust caller. (dwarf2out_late_global_decl): Likewise. * g++.dg/debug/dwarf2/pr67764.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/pr67764.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog