c++/9388: [3.4 regression] [new parser] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:278

Volker Reichelt reichelt@igpm.rwth-aachen.de
Tue Jan 21 18:06:00 GMT 2003


The following reply was made to PR c++/9388; it has been noted by GNATS.

From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, rguenth@tat.physik.uni-tuebingen.de,
        gcc-bugs@gcc.gnu.org
Cc:  
Subject: Re: c++/9388: [3.4 regression] [new parser] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:278
Date: Tue, 21 Jan 2003 20:03:47 +0100

 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
 
 



More information about the Gcc-prs mailing list