This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58591] New: GCC emits bad mangling for template function with a parameter pack
- From: "ccoutant at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Oct 2013 22:43:05 +0000
- Subject: [Bug c++/58591] New: GCC emits bad mangling for template function with a parameter pack
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58591
Bug ID: 58591
Summary: GCC emits bad mangling for template function with a
parameter pack
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ccoutant at gcc dot gnu.org
Created attachment 30944
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30944&action=edit
Reduced test case
This is reduced from <bits/stl_construct.h>.
Compiling the attached file with:
$ g++ -S -std=c++11 mangle-test.cc
Produces the following mangled name for the function Construct:
_Z9ConstructI1AIiiEEvPT_DpOT0_
This cannot be demangled, because the T0_ reference at the end refers to a
non-existent second template parameter. Removing the whole parameter pack from
the mangling reveals a bogus mangling in the template parameter section:
$ c++filt _Z9ConstructI1AIiiEEvPT_
void Construct<A<int, int> >(A<int, int>*)
The type A is not a template -- the two ints together form the parameter pack
that is the second template parameter.