public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/59468] [4.9 Regression] ICE on invalid C++ code with LTO in gimple_get_virt_method_for_binfo, at gimple-fold.c:3224 Date: Wed, 11 Dec 2013 14:23:00 -0000 [thread overview] Message-ID: <bug-59468-4-4eigWpNSng@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59468-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59468 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code CC| |hubicka at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- We have (int (*__vtbl_ptr_type) ()) &_ZTI1S at this point: 3219 fn = fold_ctor_reference (TREE_TYPE (TREE_TYPE (v)), init, 3220 offset, size, v); 3221 if (!fn || integer_zerop (fn)) 3222 return NULL_TREE; 3223 gcc_assert (TREE_CODE (fn) == ADDR_EXPR 3224 || TREE_CODE (fn) == FDESC_EXPR); (gdb) p v $2 = <var_decl 0x7ffff6d77c78 _ZTV1S> The vtable layout does not match (so we have a ODR violation here). It would be helpful to not ICE and maybe diagnose this. Not ICEing is simple by giving up instead of asserting in gimple_get_virt_method_for_binfo. We shouldn't merge any of the non-matching vtables though and thus not the types either. So I'm not yet sure how the "wrong" type can end up here.
next prev parent reply other threads:[~2013-12-11 14:23 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-12-11 12:52 [Bug lto/59468] New: " d.g.gorbachev at gmail dot com 2013-12-11 13:22 ` [Bug lto/59468] [4.9 Regression] " rguenth at gcc dot gnu.org 2013-12-11 14:23 ` rguenth at gcc dot gnu.org [this message] 2013-12-11 15:06 ` d.g.gorbachev at gmail dot com 2013-12-16 13:29 ` hubicka at gcc dot gnu.org 2013-12-16 22:40 ` d.g.gorbachev at gmail dot com 2013-12-16 23:03 ` hubicka at gcc dot gnu.org 2013-12-19 15:40 ` rguenth at gcc dot gnu.org 2014-02-11 18:07 ` d.g.gorbachev at gmail dot com 2014-02-11 22:54 ` hubicka at gcc dot gnu.org 2014-03-14 8:45 ` jakub at gcc dot gnu.org
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=bug-59468-4-4eigWpNSng@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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).