public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: snyder@fnal.gov To: gcc-gnats@gcc.gnu.org Subject: c++/6347: g++3.1: SEGV in check_initializer with typename Date: Thu, 18 Apr 2002 02:46:00 -0000 [thread overview] Message-ID: <200204180932.g3I9W4t07802@karma.fnal.gov> (raw) >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<Item>::FillableMBTChannel() void f() void f() FillableMBTChannel<Item>::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 <URL:http://www.gnu.org/software/gcc/bugs.html> 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) <typename_type 0x40188a80 ItemType VOID align 8 symtab 0 alias set 0 context <record_type 0x40181cb0 ItemTraits<int>> chain <type_decl 0x40188af0 ItemType>> It crashes because the lang_specific field of core_type is null. >How-To-Repeat: Compile this source: ------------------------------------------------------- template <class Item> struct MBTChannel { public: template <class U> struct ItemTraits { typedef int ItemType; }; }; template <class Item> struct FillableMBTChannel { FillableMBTChannel(); }; template <class Item> FillableMBTChannel<Item>:: FillableMBTChannel() { typename MBTChannel<Item>::ItemTraits<int>::ItemType dummy; } void f() { FillableMBTChannel<int> track; } ------------------------------------------------------- >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-04-18 9:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-18 2:46 snyder [this message] 2002-05-24 7:56 lerdsuwa 2003-01-03 12:55 paolo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=200204180932.g3I9W4t07802@karma.fnal.gov \ --to=snyder@fnal.gov \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).