This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ICE on template code with nested member templates and derivation


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
----------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]