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: unassig...@gcc.gnu.org ReportedBy: do...@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.