This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE on template code with nested member templates and derivation
- To: gcc-bugs at gcc dot gnu dot org
- Subject: ICE on template code with nested member templates and derivation
- From: Lutz Kettner <kettner at cs dot unc dot edu>
- Date: Thu, 21 Sep 2000 02:20:57 -0400 (EDT)
Bug report:
Compiler: g++ version 2.95.2 19991024 (release)
System: redhat Linux 6.1 on a Pentium III
Compiler call and messages:
# g++ design5.C
design5.C:14: Internal compiler error.
design5.C:14: Please submit a full bug report.
design5.C:14: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport>
for instructions.
The program:
// design5.C
// -----------------------------------
struct A {
template < class T>
struct B {
int i;
};
};
struct C {
template <class S>
struct D : public A::B<S> {
D() {} // here is the ICE
// D(); // that's the workaround, definition outside
};
};
// template <class S> C::D<S>:: D() {} // that's the workaround
// EOF //
The program illustrates already a possible workaround.
Lutz Kettner
----------------------------------------------------------------------
UNC Computer Science email: kettner@cs.unc.edu
CB 3175, Sitterson Hall phone: (919) 962-1846
Chapel Hill, NC 27599-3175, USA fax: (919) 962-1799
----------------------------------------------------------------------