From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13087 invoked by alias); 13 Nov 2002 18:56:38 -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 13068 invoked by uid 61); 13 Nov 2002 18:56:38 -0000 Date: Tue, 19 Nov 2002 18:56:00 -0000 Message-ID: <20021113185638.13067.qmail@sources.redhat.com> To: galen_sampson@yahoo.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, galen_sampson@yahoo.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/8561: Segfault when template class is not defined. X-SW-Source: 2002-11/txt/msg00622.txt.bz2 List-Id: Synopsis: Segfault when template class is not defined. State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Wed Nov 13 10:56:38 2002 State-Changed-Why: Confirmed. This is probably the minimal example: -------------------------- template class X {}; template class X::Y : X::Z {}; ----------------------------------- The code is of course bogus, since neither X::Y nor X::Z are forward declared. The compiler ICEs, however, also if X::Z _is_ forward declared, but X::Y is not. These are the messages I get (gcc 2.95 -- the last one -- does a little better, but not much; however, the message is significantly more helpful, so I raise the priority of this report): tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.ii x.ii:2: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See for instructions. tmp/g> /home/bangerth/bin/gcc-3.2.1-pre/bin/c++ -c x.ii x.ii:2: internal error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gcc-2.95: tmp/g> c++ -c x.ii x.ii:2: `X' does not have a nested type named `Y' x.ii:2: template class without a name x.ii:2: template class without a name x.ii:2: confused by earlier errors, bailing out http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8561