c++/7252: g++ 3.2: ICE in constructor_name_full
snyder@fnal.gov
snyder@fnal.gov
Tue Jul 9 15:06:00 GMT 2002
>Number: 7252
>Category: c++
>Synopsis: g++ 3.2: ICE in constructor_name_full
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Tue Jul 09 15:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: scott snyder
>Release: 3.2 20020709 (experimental)
>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 : (reconfigured) : (reconfigured)
>Description:
gcc crashes on the (invalid) source below.
$ cc1plus crash.cc
crash.cc:1: error: parse error before `>' token
crash.cc:4: error: definition of `struct locale' inside template parameter list
crash.cc:5: internal compiler error: 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 crashing:
Program received signal SIGSEGV, Segmentation fault.
0x0811117d in constructor_name_full (thing=0x0)
at ../../egcs/gcc/cp/decl2.c:1777
1777 if (TREE_CODE (thing) == TEMPLATE_TYPE_PARM
(gdb) where
#0 0x0811117d in constructor_name_full (thing=0x0)
at ../../egcs/gcc/cp/decl2.c:1777
#1 0x081116d1 in constructor_name (thing=0x0)
at ../../egcs/gcc/cp/decl2.c:1807
#2 0x0808f5f4 in grokdeclarator (declarator=0x40190b80, declspecs=0x4018c320,
decl_context=FIELD, initialized=0, attrlist=0xbfffb560)
at ../../egcs/gcc/cp/decl.c:11248
#3 0x08110086 in grokfield (declarator=0x40190b80, declspecs=0x4018c320,
init=0x0, asmspec_tree=0x0, attrlist=0x0) at ../../egcs/gcc/cp/decl2.c:1490
#4 0x08134814 in parse_field (declarator=0x40190b80, attributes=0x0,
asmspec=0x0, init=0x0) at parse.y:210
#5 0x08134860 in parse_field0 (declarator=0x40190b80, specs_attrs=0x4018c320,
lookups=0x0, attributes=0x0, asmspec=0x0, init=0x0) at parse.y:221
#6 0x0813b8cc in yyparse () at parse.y:2781
#7 0x081d014c in c_common_parse_file (set_yydebug=0)
at ../../egcs/gcc/c-lex.c:165
#8 0x08406ded in compile_file () at ../../egcs/gcc/toplev.c:2101
>How-To-Repeat:
------------------
template<typename _InIter = xxx> class num_get;
struct locale
{
typedef unsigned int category;
};
------------------
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list