dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed.
authorJakub Jelinek <jakub@redhat.com>
Fri, 21 Oct 2016 15:11:48 +0000 (17:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 21 Oct 2016 15:11:48 +0000 (17:11 +0200)
commit8e6982f7aac4c8d539f194e302fb67179f98c3f1
tree23d9b415e858a7e4be5217e8b836ea49a685e47b
parentf9faea3725f6064ab226f1089d255b4f23bc5bef
dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed.

* dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute
if needed.  Re-add origin_die variable and its initialization.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle
DW_AT_const_expr.
testsuite/
* g++.dg/debug/dwarf2/constexpr-var-1.C: New test.

From-SVN: r241408
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/constexpr-var-1.C [new file with mode: 0644]