re PR debug/67664 (Duplicate AT_const_value attributes in some c++ cases.)
authorRichard Biener <rguenther@suse.de>
Mon, 21 Sep 2015 14:02:27 +0000 (14:02 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 21 Sep 2015 14:02:27 +0000 (14:02 +0000)
commit9386cdeee67582bdef3590ec0f9a8b1ab7600e59
tree3060190ad1b1018a00a514adf4aab582c10767f7
parentce89c02e8661d0461aa8e21e2159ecb67dfe1145
re PR debug/67664 (Duplicate AT_const_value attributes in some c++ cases.)

2015-09-21  Richard Biener  <rguenther@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.

From-SVN: r227972
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/pr67764.C [new file with mode: 0644]