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]
Other format: [Raw text]

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



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