From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6082 invoked by alias); 9 Nov 2002 23:54:53 -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 6063 invoked by uid 61); 9 Nov 2002 23:54:52 -0000 Date: Sat, 09 Nov 2002 15:54:00 -0000 Message-ID: <20021109235452.6062.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, wwieser@gmx.de From: reichelt@igpm.rwth-aachen.de Reply-To: reichelt@igpm.rwth-aachen.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, wwieser@gmx.de, gcc-gnats@gcc.gnu.org Subject: Re: c++/8511: (hopefully) reproducible cc1plus SIGSEGV. X-SW-Source: 2002-11/txt/msg00463.txt.bz2 List-Id: Synopsis: (hopefully) reproducible cc1plus SIGSEGV. State-Changed-From-To: open->analyzed State-Changed-By: reichelt State-Changed-When: Sat Nov 9 15:54:52 2002 State-Changed-Why: Confirmed. Compiling the code with gcc 3.2 I get an internal compiler error. The problem can be reduced to the following code snippet: ------------------------snip here-------------------- template struct A { void foo(); template friend int bar (const A&, const A&); }; template <> void A<0>::foo() {} template int bar (const A&, const A&) { return N; } void baz () { bar(A<1>(),A<2>()); } ------------------------snip here-------------------- Compiling this with gcc 3.2 (just "g++ -c") I get the following ICE: bug.cc: In function `int bar(const A&, const A&) [with int M = 2, int N = 1, int I = 0]': bug.cc:11: instantiated from here bug.cc:9: Internal compiler error in c_expand_expr, at c-common.c:3646 Please submit a full bug report, [etc.] In fact, the short testcase crashes gcc since 2.95.x. The code looks illegal to me (foo is specialized without having specialized A first). http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8511