public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bangerth@dealii.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jh@suse.cz, nathan@gcc.gnu.org, nobody@gcc.gnu.org, pthomas@suse.de Subject: Re: c++/10405: [3.3/3.4 regression] Segfault in setup_class_bindings Date: Tue, 15 Apr 2003 16:09:00 -0000 [thread overview] Message-ID: <20030415160901.30171.qmail@sources.redhat.com> (raw) 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
next reply other threads:[~2003-04-15 16:09 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-15 16:09 bangerth [this message] 2003-04-20 12:18 nathan
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=20030415160901.30171.qmail@sources.redhat.com \ --to=bangerth@dealii.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=jh@suse.cz \ --cc=nathan@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ --cc=pthomas@suse.de \ /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).