This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/55641] debug info for the type of a reference declared with a typedef has spurious 'const'
- From: "aoliva at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Aug 2016 07:12:08 +0000
- Subject: [Bug debug/55641] debug info for the type of a reference declared with a typedef has spurious 'const'
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-55641-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55641
--- Comment #12 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Author: aoliva
Date: Fri Aug 12 07:11:36 2016
New Revision: 239402
URL: https://gcc.gnu.org/viewcvs?rev=239402&root=gcc&view=rev
Log:
[PR55641] drop spurious const_type from reference_type variables
Although C++ reference types, denoted by DW_TAG_reference_type in
DWARFv2+ debug info, are unchangeable, we output names of reference type
with DW_TAG_const_type, because internally we mark such variables as
TREE_READONLY. That's an internal implementation detail that shouldn't
leak to debug information. This patch fixes this.
for gcc/ChangeLog
PR debug/55641
* dwarf2out.c (decl_quals): Don't map TREE_READONLY to
TYPE_QUAL_CONST in reference-typed decls.
for gcc/testsuite/ChangeLog
PR debug/55641
* g++.dg/debug/dwarf2/ref-1.C: New.
Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/ref-1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog