This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31446] New: [4.2/4.3 regression] ICE with invalid template parameter
- 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: 2 Apr 2007 20:40:54 -0000
- Subject: [Bug c++/31446] New: [4.2/4.3 regression] ICE with invalid template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE on mainline and 4.2 branch:
===========================================================
template<void> struct A
{
template<int> friend void foo();
};
void bar()
{
foo<0>();
}
===========================================================
bug.cc:1: error: 'void' is not a valid type for a template constant parameter
bug.cc: In function 'void bar()':
bug.cc:8: internal compiler error: in retrieve_specialization, at cp/pt.c:856
Please submit a full bug report, [etc.]
--
Summary: [4.2/4.3 regression] ICE with invalid template parameter
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, 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=31446