public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10405: [3.3/3.4 regression] Segfault in setup_class_bindings
@ 2003-04-20 12:18 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2003-04-20 12:18 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jh, nathan, pthomas
Synopsis: [3.3/3.4 regression] Segfault in setup_class_bindings
State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Sun Apr 20 12:18:57 2003
State-Changed-Why:
fixed
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10405
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/10405: [3.3/3.4 regression] Segfault in setup_class_bindings
@ 2003-04-15 16:09 bangerth
0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-15 16:09 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, jh, nathan, nobody, pthomas
Old Synopsis: [3.3/3.4 regression] [x86-64] Recently introduced segfault in setup_class_bindings
New Synopsis: [3.3/3.4 regression] Segfault in setup_class_bindings
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: bangerth
Responsible-Changed-When: Tue Apr 15 16:09:01 2003
Responsible-Changed-Why:
Author of a patch that might have caused this.
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Apr 15 16:09:01 2003
State-Changed-Why:
Man, this was a tough one (looks like memory corruption, since
changing names makes the ICE go away sometimes):
----------------------------
struct Empty {};
struct Y {
Y();
};
struct S : Y, Empty {
enum {};
bool b1, b2, b3, b4, b5, b6, SAMENAME, b7, b8, b9;
enum {};
enum SAMENAME { n };
};
S s;
--------------------------
This crashes 3.3 and mainline (3.4). It doesn't in 3.2.3.
x/z> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:12: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
The ICE happens here:
(gdb) bt
#0 setup_class_bindings (name=0x401989c0, type_binding_p=1)
at ../../gcc-3.4-CVS/gcc/cp/search.c:2052
#1 0x0812d060 in dfs_push_type_decls (binfo=0x40198740, data=0x0)
at ../../gcc-3.4-CVS/gcc/cp/search.c:2104
#2 0x0812b2d8 in dfs_walk_real (binfo=0x40198740, prefn=0,
postfn=0x812cfc0 <dfs_push_type_decls>,
qfn=0x812c8a0 <unmarked_pushdecls_p>, data=0x0)
at ../../gcc-3.4-CVS/gcc/cp/search.c:1615
#3 0x0812b41e in dfs_walk (binfo=0x0, fn=0, qfn=0, data=0x0)
at ../../gcc-3.4-CVS/gcc/cp/search.c:1629
#4 0x0812d4b4 in push_class_decls (type=0x2)
at ../../gcc-3.4-CVS/gcc/cp/search.c:2169
#5 0x080cc67b in pushclass (type=0x4019b000, modify=true)
at ../../gcc-3.4-CVS/gcc/cp/class.c:5594
This is here:
/* First, deal with the type binding. */
if (type_binding_p)
{
type_binding = lookup_member (current_class_type, name,
/*protect=*/2, /*want_type=*/true);
if (TREE_CODE (type_binding) == TREE_LIST
&& TREE_TYPE (type_binding) == error_mark_node)
/* NAME is ambiguous. */
push_class_level_binding (name, type_binding);
else
pushdecl_class_level (type_binding);
}
It crashes in the inner if clause, since type_binding==0.
Nathan, the assignment to type_binding was last changed by
this patch:
----------------------------
revision 1.252
date: 2003/02/15 18:03:22; author: nathan; state: Exp; lines: +135 -273
* search.c: ANSIfy function declarations and definitions.
* cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
* call.c (build_method_call, resolve_scoped_fn_name,
build_java_interface_fn_ref): Adjust lookup_field, lookup_member
calls.
* class.c (handle_using_decl): Likewise.
* decl.c (make_typename_type, make_unmound_class_template,
start_decl, compute_array_index_type): Likewise.
* decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
* init.c (expand_member_init, build_member_call): Likewise.
* pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
resolve_typename_type): Likewise.
* typeck.c (lookup_destructor, finish_class_member_access_exprm
build_prememfunc_access_expr): Likewise.
Would you mind taking a look?
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10405
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-20 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-20 12:18 c++/10405: [3.3/3.4 regression] Segfault in setup_class_bindings nathan
-- strict thread matches above, loose matches on Subject: below --
2003-04-15 16:09 bangerth
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).