From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32722 invoked by alias); 7 Jan 2003 23:34:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32703 invoked by uid 61); 7 Jan 2003 23:34:02 -0000 Date: Tue, 07 Jan 2003 23:34:00 -0000 Message-ID: <20030107233402.32702.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, tkarkanis@aw.sgi.com From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, tkarkanis@aw.sgi.com, gcc-gnats@gcc.gnu.org Subject: Re: c++/9222: compiler crash in nested, self-referential template X-SW-Source: 2003-01/txt/msg00478.txt.bz2 List-Id: Synopsis: compiler crash in nested, self-referential template State-Changed-From-To: open->closed State-Changed-By: bangerth State-Changed-When: Tue Jan 7 15:34:01 2003 State-Changed-Why: This is already fixed in 3.2.2pre, 3.3pre and 3.4 mainline, but I can confirm the crash for 3.2. With the first three versions, you now get something along tmp/g> /home/bangerth/bin/gcc-3.2.2-pre/bin/c++ -c gccbug.cpp gccbug.cpp: In constructor `FinalIterator::iterator::iterator(const Impl&) [with T = int, Iterator = ForwardIterator, Impl = int]': gccbug.cpp:30: instantiated from here gccbug.cpp:21: no type named `iterator' in `struct ForwardIterator' gccbug.cpp:21: no matching function for call to `ForwardIterator::iterator::iterator, int>::iterator()' gccbug.cpp:5: candidates are: ForwardIterator::iterator::iterator, int>::iterator(const ForwardIterator::iterator::iterator, int>&) gccbug.cpp:8: ForwardIterator::iterator::iterator(const Impl&) [with T = int, Final = FinalIterator::iterator, Impl = int] As you mentioned, the bug goes away when you uncomment the one line: the original code is illegal, while the second line is the legal one, so you need to write that one (the class name is only an alias of the class name + all its template arguments for the present class, not for the base class). The error was thus an ICE-on-illegal, but as mentioned this is already fixed. Thanks W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9222