This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34776] New: [4.1/4.2/4.3 regression] ICE with invalid member declaration in template class
- 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: 13 Jan 2008 22:22:45 -0000
- Subject: [Bug c++/34776] New: [4.1/4.2/4.3 regression] ICE with invalid member declaration in template class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE since GCC 4.1.0:
===================================
template<typename T> struct A
{
T::X<0> x;
};
A<int*> a;
===================================
bug.cc:3: error: non-template 'X' used as template
bug.cc:3: note: use 'T::template X' to indicate that it is a template
bug.cc: In instantiation of 'A<int*>':
bug.cc:6: instantiated from here
bug.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2/4.3 regression] ICE with invalid member
declaration in template class
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=34776