This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19498] New: ICE on invalid reference in 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: 18 Jan 2005 08:56:37 -0000
- Subject: [Bug c++/19498] New: ICE on invalid reference in template parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet causes an ICE since at least gcc 2.95.3:
==============================
template<typename T> struct A
{
template<T&> struct B;
};
A<void> a;
==============================
bug3.cc: In instantiation of 'A<void>':
bug3.cc:6: instantiated from here
bug3.cc:3: error: forming reference to void
bug3.cc:3: internal compiler error: tree check: expected tree_vec, have
error_mark in retrieve_specialization, at cp/pt.c:822
Please submit a full bug report, [etc.]
Using "int&" instead of "void" to instantiate the template also causes
an ICE.
--
Summary: ICE on invalid reference in template parameter
Product: gcc
Version: 4.0.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=19498