From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8827 invoked by alias); 15 Dec 2010 10:19:39 -0000 Received: (qmail 8817 invoked by uid 22791); 15 Dec 2010 10:19:39 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Dec 2010 10:19:34 +0000 From: "dodji at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 15 Dec 2010 10:19:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg01721.txt.bz2 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 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.