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