From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10785 invoked by alias); 8 May 2003 17:07:36 -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 10763 invoked by uid 48); 8 May 2003 17:07:36 -0000 Date: Thu, 08 May 2003 17:07:00 -0000 Message-ID: <20030508170736.10761.qmail@sources.redhat.com> To: gawrilow@math.tu-berlin.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, giovannibajo@libero.it, nobody@gcc.gnu.org From: giovannibajo@libero.it Reply-To: giovannibajo@libero.it, gawrilow@math.tu-berlin.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, giovannibajo@libero.it, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/10661: ICE in instantiate_decl, at cp/pt.c:10052 while instantiating static member variables X-SW-Source: 2003-05/txt/msg00633.txt.bz2 List-Id: Old Synopsis: [3.3/3.4? regression] ICE in instantiate_decl New Synopsis: ICE in instantiate_decl, at cp/pt.c:10052 while instantiating static member variables Responsible-Changed-From-To: bajo->unassigned Responsible-Changed-By: bajo Responsible-Changed-When: Thu May 8 17:07:36 2003 Responsible-Changed-Why: Analysys is done State-Changed-From-To: open->analyzed State-Changed-By: bajo State-Changed-When: Thu May 8 17:07:36 2003 State-Changed-Why: Ok, I'm done with this report. This is the reduced snippet that triggers the bug: ------------------------------------------------ template struct Foo { static const int var = 0; template struct Nested { static const int nested_var = var; }; }; template struct Bar { typename Foo::Nested a; }; template struct Bar; ------------------------------------------------ pr10661.cpp: In instantiation of `const int Foo::var': pr10661.cpp:9: instantiated from `Foo::Nested' pr10661.cpp:16: instantiated from `Bar' pr10661.cpp:19: instantiated from here pr10661.cpp:4: internal compiler error: in instantiate_decl, at cp/pt.c:10330 Please submit a full bug report, As anticipated, the code is illegal: it's missing a keyword 'template' in line 16, but we should not ICE anyway. Now the funny thing is, this reduced snippet is not a regression. I have no _clue_ why the original big testcase did compile on 3.2, probably for some weird reason. And I will _not_ go through everything again to find the difference, since there is an easy fix for this: just make the code legal. Anyway, while working on this I forked out about 10 other ICEs, which I will file to GNATS and analyze in the next few days. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10661