public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dodji at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter
Date: Wed, 15 Dec 2010 10:19:00 -0000	[thread overview]
Message-ID: <bug-46955-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2010-12-15 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 10:19 dodji at gcc dot gnu.org [this message]
2010-12-15 10:21 ` [Bug debug/46955] " dodji at gcc dot gnu.org
2010-12-16 17:09 ` dodji at gcc dot gnu.org
2011-01-11 21:39 ` dodji at gcc dot gnu.org
2011-01-11 23:13 ` dodji at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46955-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).