public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6347: g++3.1: SEGV in check_initializer with typename
@ 2002-05-24 7:56 lerdsuwa
0 siblings, 0 replies; 3+ messages in thread
From: lerdsuwa @ 2002-05-24 7:56 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, snyder
Synopsis: g++3.1: SEGV in check_initializer with typename
State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Fri May 24 07:52:50 2002
State-Changed-Why:
Confirmed. The code is illegal. Replacing the line
typename MBTChannel<Item>::ItemTraits<int>::ItemType dummy;
with the correct one
typename MBTChannel<Item>::template ItemTraits<int>::ItemType dummy;
the ICE disappears.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6347
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/6347: g++3.1: SEGV in check_initializer with typename
@ 2003-01-03 12:55 paolo
0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2003-01-03 12:55 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, snyder
Synopsis: g++3.1: SEGV in check_initializer with typename
State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Fri Jan 3 04:55:57 2003
State-Changed-Why:
Already fixed everywhere.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6347
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/6347: g++3.1: SEGV in check_initializer with typename
@ 2002-04-18 2:46 snyder
0 siblings, 0 replies; 3+ messages in thread
From: snyder @ 2002-04-18 2:46 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-03 12:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-24 7:56 c++/6347: g++3.1: SEGV in check_initializer with typename lerdsuwa
-- strict thread matches above, loose matches on Subject: below --
2003-01-03 12:55 paolo
2002-04-18 2:46 snyder
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).