From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26199 invoked by alias); 18 Apr 2002 09:46:08 -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 26176 invoked by uid 71); 18 Apr 2002 09:46:04 -0000 Resent-Date: 18 Apr 2002 09:46:04 -0000 Resent-Message-ID: <20020418094604.26169.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, snyder@fnal.gov Received:(qmail 23216 invoked from network); 18 Apr 2002 09:35:57 -0000 Received: from unknown (HELO karma.fnal.gov) (131.225.104.31) by sources.redhat.com with SMTP; 18 Apr 2002 09:35:57 -0000 Received: (from sss@localhost) by karma.fnal.gov (8.11.6/8.11.6) id g3I9W4t07802; Thu, 18 Apr 2002 04:32:04 -0500 Message-Id:<200204180932.g3I9W4t07802@karma.fnal.gov> Date: Thu, 18 Apr 2002 02:46:00 -0000 From: snyder@fnal.gov Reply-To: snyder@fnal.gov To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: c++/6347: g++3.1: SEGV in check_initializer with typename X-SW-Source: 2002-04/txt/msg00916.txt.bz2 List-Id: >Number: 6347 >Category: c++ >Synopsis: g++3.1: SEGV in check_initializer with typename >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu Apr 18 02:46:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: scott snyder >Release: 3.1 20020417 (prerelease) >Organization: >Environment: System: Linux karma 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77 : (reconfigured) >Description: I get an ICE compiling the source below: $ cc1plus x.cc FillableMBTChannel::FillableMBTChannel() void f() void f() FillableMBTChannel::FillableMBTChannel() [with Item = int] x.cc:29: instantiated from here x.cc:23: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. $ Here's where it's dying: Program received signal SIGSEGV, Segmentation fault. 0x08063608 in check_initializer (decl=0x40188b60, init=0x0) at ../../egcs/gcc/cp/decl.c:7896 7896 if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type)) (gdb) where #0 0x08063608 in check_initializer (decl=0x40188b60, init=0x0) at ../../egcs/gcc/cp/decl.c:7896 #1 0x08064163 in cp_finish_decl (decl=0x40188b60, init=0x0, asmspec_tree=0x0, flags=0) at ../../egcs/gcc/cp/decl.c:8276 ... (gdb) call debug_tree (core_type) > chain > It crashes because the lang_specific field of core_type is null. >How-To-Repeat: Compile this source: ------------------------------------------------------- template struct MBTChannel { public: template struct ItemTraits { typedef int ItemType; }; }; template struct FillableMBTChannel { FillableMBTChannel(); }; template FillableMBTChannel:: FillableMBTChannel() { typename MBTChannel::ItemTraits::ItemType dummy; } void f() { FillableMBTChannel track; } ------------------------------------------------------- >Fix: >Release-Note: >Audit-Trail: >Unformatted: