This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33046] New: ICE on explicit/partial template static member specialization mix-up
- From: "gcc-bugzilla at waba dot be" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2007 09:48:30 -0000
- Subject: [Bug c++/33046] New: ICE on explicit/partial template static member specialization mix-up
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
g++ 4 will ICE when provided the explicit template specialization of a static
class member with an extra template argument (like for a partial spec):
template<typename T>
struct S { static int v; };
template<typename T> // instead of template<>
int S<int>::v;
g++ 3.3.6 and 3.4.6 compile this without complaining. g++ 4.1.3, 4.2.1 and
yesterday's SVN (r127350) produce an ICE:
$ bin/g++ -c /tmp/t.cpp
/tmp/t.cpp:4: internal compiler error: in import_export_decl, at
cp/decl2.c:1965
Please submit...
Expected output:
template parameters not used in partial specialization: ?T?
--
Summary: ICE on explicit/partial template static member
specialization mix-up
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at waba dot be
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33046