public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/64043] [5 Regression] ICE (segfault) with LTO: in tree_check/tree.h:2758 get_binfo_at_offset/tree.c:11914 Date: Tue, 02 Dec 2014 21:04:00 -0000 [thread overview] Message-ID: <bug-64043-4-xgvllCVaze@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64043-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64043 Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at redhat dot com --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- OK, the problem is that the unit is compiled without -O2 and -fdevirtualize is not properly marked as Optimization (have separate patch for this). However it seems that for units that are not optimized with -fdevirtualize we can just drop OBJ_TYPE_REF and save some of IL memory? Jason, does this have chance to interfere with devirtualization required by C++ language that happens at -fno-devirtualize too? Honza Index: cp/class.c =================================================================== --- cp/class.c (revision 218249) +++ cp/class.c (working copy) @@ -736,7 +736,8 @@ build_vfn_ref (tree instance_ptr, tree i cp_build_addr_expr (aref, tf_warning_or_error)); /* Remember this as a method reference, for later devirtualization. */ - aref = build3 (OBJ_TYPE_REF, TREE_TYPE (aref), aref, instance_ptr, idx); + if (flag_devirtualize) + aref = build3 (OBJ_TYPE_REF, TREE_TYPE (aref), aref, instance_ptr, idx); return aref; } Index: testsuite/g++.dg/lto/pr64043_0.C =================================================================== --- testsuite/g++.dg/lto/pr64043_0.C (revision 0) +++ testsuite/g++.dg/lto/pr64043_0.C (revision 0) @@ -0,0 +1,14 @@ +// { dg-lto-do link } +// { dg-lto-options { { -flto -std=c++11 } } } +// { dg-extra-ld-options "-r -nostdlib -O2" } +class Validator +{ +public: + virtual ~Validator (); +}; +class FooWriter +{ + Validator *validator; + ~FooWriter (); +}; +FooWriter::~FooWriter () { delete validator; }
next prev parent reply other threads:[~2014-12-02 21:04 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-11-24 9:59 [Bug lto/64043] New: " burnus at gcc dot gnu.org 2014-12-02 21:04 ` hubicka at gcc dot gnu.org [this message] 2014-12-02 21:08 ` [Bug lto/64043] " hubicka at gcc dot gnu.org 2014-12-02 21:20 ` jason at gcc dot gnu.org 2014-12-12 15:41 ` burnus at gcc dot gnu.org 2014-12-12 15:43 ` burnus at gcc dot gnu.org 2014-12-12 19:01 ` hubicka at gcc dot gnu.org 2014-12-15 3:42 ` hubicka at gcc dot gnu.org 2014-12-15 22:36 ` hubicka at gcc dot gnu.org 2014-12-16 11:22 ` schwab@linux-m68k.org 2014-12-17 14:29 ` dominiq at lps dot ens.fr 2014-12-22 15:03 ` izamyatin at gmail dot com 2014-12-22 15:17 ` hubicka at ucw dot cz 2014-12-22 15:36 ` izamyatin at gmail dot com 2015-01-12 7:47 ` izamyatin at gmail dot com 2015-01-14 6:37 ` hubicka at gcc dot gnu.org 2015-01-29 7:17 ` hubicka 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-64043-4-xgvllCVaze@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).