From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5246 invoked by alias); 8 May 2003 23:02:48 -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 5216 invoked by uid 48); 8 May 2003 23:02:47 -0000 Date: Thu, 08 May 2003 23:02:00 -0000 Message-ID: <20030508230247.5214.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, seth.goldberg@sun.com From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, seth.goldberg@sun.com, gcc-gnats@gcc.gnu.org Subject: Re: c++/5754: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code X-SW-Source: 2003-05/txt/msg00666.txt.bz2 List-Id: Old Synopsis: [2003-01-21] g++ segfaults on compilation of template-enriched code New Synopsis: [3.3 regression] [2003-05-06] g++ segfaults on compilation of template-enriched code State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Thu May 8 23:02:47 2003 State-Changed-Why: This is actually related to something that has been recently fixed: ---------------------------- struct P {}; template struct O { struct I; }; template struct O::I::S : P {}; ------------------------- Note that S doesn't exist, since I isn't declared (except for the forward declaration, of course). If I isn't derived from P, then we get a proper error message since recently. If it is, as in the snippet above, then we get an ICE with 3.3, and a tree checking error in 3.4: g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc x.cc:11: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc x.cc:10: error: could not resolve typename type x.cc:10: internal compiler error: tree check: expected class 'd', have 'x' ( error_mark) in cp_parser_class_head, at cp/parser.c:11804 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Note that 3.3 doesn't give an error message before crashing. On the other hand, 2.95 at least said g/x> c++ -c x.cc x.cc:10: `typename O<{anonymous template type parm}>::I' does not have a nested type named `S' x.cc:10: template class without a name x.cc:10: template class without a name x.cc:11: confused by earlier errors, bailing out I think this is thus a regression of sorts. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5754