This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter
- From: "dodji at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Dec 2010 10:19:33 +0000
- Subject: [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955
Summary: Missing DW_AT_const_value from
DW_TAG_template_value_parameter
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dodji@gcc.gnu.org
struct S { int f; };
template<int S::*MP> struct T { };
T<&S::f> v;
For v's type, I just see:
<2><4f>: Abbrev Number: 6 (DW_TAG_template_value_param)
<50> DW_AT_name : MP
<53> DW_AT_type : <0x58>
That is, this parameter has no value.
This is because the DWARF emitter doesn't know how to handle the C++ specific
PTRMEM_CST node that represenst the argument &S::f at that point. That
PTRMEM_CST needs to be folded further into something low level enough for the
DWARF emitter to understand, while keeping its OFFSET_TYPE type meaning it's a
pointer-to-member constant.
This has been first reported in a comment of PR debug/41736, but I am opening
this specific bug for it as I think those two bugs are different.