public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter
@ 2010-12-15 10:19 dodji at gcc dot gnu.org
2010-12-15 10:21 ` [Bug debug/46955] " dodji at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2010-12-15 10:19 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter
2010-12-15 10:19 [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter dodji at gcc dot gnu.org
@ 2010-12-15 10:21 ` dodji at gcc dot gnu.org
2010-12-16 17:09 ` dodji at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2010-12-15 10:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.12.15 10:21:25
AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter
2010-12-15 10:19 [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter dodji at gcc dot gnu.org
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
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2010-12-16 17:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955
--- Comment #1 from Dodji Seketeli <dodji at gcc dot gnu.org> 2010-12-16 17:09:21 UTC ---
Candidate patch posted to
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01276.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter
2010-12-15 10:19 [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter dodji at gcc dot gnu.org
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
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-01-11 21:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-01-11 21:20:13 UTC ---
Author: dodji
Date: Tue Jan 11 21:20:07 2011
New Revision: 168681
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168681
Log:
Fix PR debug/46955
gcc/cp/
* cp-lang.c (get_template_innermost_arguments_folded)
(get_template_argument_pack_elems_folded)
(template_arg_needs_folding, fold_cplus_constants): New static
functions.
(LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
get_template_innermost_arguments_folded.
(LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
get_template_argument_pack_elems_folded.
gcc/testsuite/
* g++.dg/debug/dwarf2/template-params-8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-lang.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter
2010-12-15 10:19 [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter dodji at gcc dot gnu.org
` (2 preceding siblings ...)
2011-01-11 21:39 ` dodji at gcc dot gnu.org
@ 2011-01-11 23:13 ` dodji at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-01-11 23:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-01-11 21:24:07 UTC ---
Fixed in trunk (4.6).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-11 21:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 10:19 [Bug debug/46955] New: Missing DW_AT_const_value from DW_TAG_template_value_parameter dodji at gcc dot gnu.org
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
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).