This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9388: [3.4 regression] [new parser] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:278
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-gnats at gcc dot gnu dot org, rguenth at tat dot physik dot uni-tuebingen dot de, gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Jan 2003 20:03:47 +0100
- Subject: Re: c++/9388: [3.4 regression] [new parser] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:278
A shorter (IMHO legal) testcase is the following:
=============================================================================
template <typename T> struct A
{
typedef int X;
};
template <typename T> struct B
{
typename A<T>::X x;
};
template <typename T> struct C
{
void foo(int);
B<A<T>*> b;
};
template <typename T> struct D
{
enum { e };
void bar() { C<T*>::foo(e); }
};
=============================================================================
It compiles fine with gcc 2.95.3 - 3.3 branch, but crashes with
gcc 3.4-20030116. The message is:
PR9388.cc: In instantiation of `B<A<T*>*>':
PR9388.cc:14: instantiated from `C<T*>'
PR9388.cc:20: instantiated from here
PR9388.cc:8: error: `B<T>::x' has incomplete type
PR9388.cc:8: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:278
Regards,
Volker
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9388