This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22153] New: [3.4/4.0/4.1 regression] ICE on invalid template specialization
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2005 21:46:11 -0000
- Subject: [Bug c++/22153] New: [3.4/4.0/4.1 regression] ICE on invalid template specialization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Since GCC 3.4.0 we get an ICE on the following invalid code snippet:
=======================================
template<int> void foo();
template<int> struct A
{
template<> friend void foo<0>();
};
=======================================
bug.cc:5: error: invalid explicit specialization before '>' token
bug.cc:5: error: explicit specialization in non-namespace scope 'struct
A<<anonymous> >'
bug.cc:5: error: enclosing class templates are not explicitly specialized
bug.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
--
Summary: [3.4/4.0/4.1 regression] ICE on invalid template
specialization
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22153