The following invalid testcase triggers an ICE on mainline and 4.1 branch:
========================================================
template<int> struct A
{
template<typename> void foo();
};
template<int> template<typename> void A<0>::foo() {}
========================================================
bug.cc:6: internal compiler error: in check_classfn, at cp/decl2.c:579
Please submit a full bug report, [etc.]
The regression happened between 4.1.1 and 4.1.2-20060714 on the 4.1 branch.
The problem is related to PR 27962.
--
Summary: [4.1/4.2 regression] ICE with invalid specialization
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28743