This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11249] New: Too many similar declarations cause crash in the name mangler
- From: "ritzert at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2003 11:30:51 -0000
- Subject: [Bug c++/11249] New: Too many similar declarations cause crash in the name mangler
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11249
Summary: Too many similar declarations cause crash in the name
mangler
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ritzert@t-online.de
CC: gcc-bugs@gcc.gnu.org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Generate a .cpp file with this script:
for x in $(seq 1 24); do
cat <<EOF
template<class T_slice>
class x_$x
{
operator T_slice*() const;
};
EOF
done
When compiling with GNU C version 3.4 20030618 (experimental) I get
Program received signal SIGSEGV, Segmentation fault.
0x0815502b in hash_type (val=0x0) at
/home/ritzert/gcc/HEAD/gcc/gcc/cp/mangle.c:2600
2600 return htab_hash_pointer (TREE_PURPOSE (*((tree *) val)));
(gdb) bt
#0 0x0815502b in hash_type (val=0x0) at
/home/ritzert/gcc/HEAD/gcc/gcc/cp/mangle.c:2600
#1 0x08483bae in htab_expand (htab=0x40199600) at
/home/ritzert/gcc/HEAD/gcc/libiberty/hashtab.c:405
#2 0x08483d90 in htab_find_slot_with_hash (htab=0x40199600,
element=0x401ac57c, hash=134437039, insert=INSERT) at
/home/ritzert/gcc/HEAD/gcc/libiberty/hashtab.c:506
#3 0x08155102 in mangle_conv_op_name_for_type (type=0x401ac57c) at
/home/ritzert/gcc/HEAD/gcc/gcc/cp/mangle.c:2625
#4 0x080fa974 in cp_parser_unqualified_id (parser=0x40199480,
template_keyword_p=76, check_dependency_p=true) at
/home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:3168
When I generate only 23 declarations, it compiles fine.