From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13256 invoked by alias); 12 Mar 2002 14:06:07 -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 13213 invoked by uid 71); 12 Mar 2002 14:06:04 -0000 Resent-Date: 12 Mar 2002 14:06:04 -0000 Resent-Message-ID: <20020312140604.13212.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, reichelt@igpm.rwth-aachen.de Received:(qmail 8916 invoked by uid 61); 12 Mar 2002 13:56:41 -0000 Message-Id:<20020312135640.8915.qmail@sources.redhat.com> Date: Tue, 12 Mar 2002 06:06:00 -0000 From: reichelt@igpm.rwth-aachen.de Reply-To: reichelt@igpm.rwth-aachen.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/5921: ICE with static variable X-SW-Source: 2002-03/txt/msg00380.txt.bz2 List-Id: >Number: 5921 >Category: c++ >Synopsis: ICE with static variable >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Tue Mar 12 06:06:03 PST 2002 >Closed-Date: >Last-Modified: >Originator: Volker Reichelt >Release: gcc version 3.1 20020304 (prerelease) >Organization: >Environment: mips-sgi-irix6.5, i686-pc-linux-gnu >Description: The following code snippet causes an ICE when compiled with gcc 3.1. It's a regression vs. gcc 3.0.x. ----------------------snip here------------------ struct A { struct B { B(); }; }; static A::B b; inline template void f (); ----------------------snip here------------------ The error message is: bug.cpp:8: parse error before `<' token bug.cpp:6: definition provided for explicit instantiation bug.cpp:6: non-template used as template bug.cpp:6: internal error: Segmentation fault Please submit a full bug report, [etc.] The example above is very similar to PR 5624. It looks as if both show different symptoms of the same bug. Maybe the patch for PR 5624 that cured one symptom gets superfluous, once the underlying real bug is fixed. Therefore, IMHO, PR 5624 should be revisited, too. Since a similar static declaration occurs in iostream (A == ios_base and B == Init), the bug might affect quite a number of programs. >How-To-Repeat: g++ -c bug.cpp >Fix: >Release-Note: >Audit-Trail: >Unformatted: