This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/49348] DW_TAG_template_* DIEs missing from template specializations
- 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: Thu, 9 Jun 2011 21:46:17 +0000
- Subject: [Bug debug/49348] DW_TAG_template_* DIEs missing from template specializations
- Auto-submitted: auto-generated
- References: <bug-49348-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49348
--- Comment #1 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-06-09 21:46:17 UTC ---
Created attachment 24479
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24479
Candidate patch
For a given template instantiation, the dwarf backends emits debug
info that describes its template parameters and arguments if
generic_type_p returns TRUE on the the instantiation. For that,
primary_template_instantiation_p must be also return TRUE.
The problem in this PR is that primary_template_instantiation_p
doesn't return TRUE for explicit specializations. This patch makes it
return true for explicit specializations and instantiations of a
primary template.
Stricto sensu I think I should rename the function
primary_template_instantiation_p into
primary_template_specialization_p, as [temp.spec]/4 reads
A specialization is a class, function, or class member that is
either instantiated or explicitly specialized