public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: gcc-patches@gcc.gnu.org
Subject: Fix ICE with -O0 -fdevirtualize
Date: Fri, 06 Sep 2013 10:35:00 -0000	[thread overview]
Message-ID: <20130906103540.GC12994@kam.mff.cuni.cz> (raw)

Hi,
this patch fixes ICE with -O0 -fdevirtualize where we try to access type inheritance
graph that does not exist.

Bootstrapped/regtested x86_64-linux, comitted.

2013-09-06  Jan Hubicka  <jh@suse.cz>

	PR tree-optimization/58311
	* ipa-devirt.c (gate_ipa_devirt): Only execute when optimizing.

Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c	(revision 202315)
+++ ipa-devirt.c	(working copy)
@@ -1114,9 +1114,7 @@ ipa_devirt (void)
 static bool
 gate_ipa_devirt (void)
 {
-  /* FIXME: We should remove the optimize check after we ensure we never run
-     IPA passes when not optimizing.  */
-  return flag_devirtualize && !in_lto_p;
+  return flag_devirtualize && !in_lto_p && optimize;
 }
 
 namespace {

                 reply	other threads:[~2013-09-06 10:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20130906103540.GC12994@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@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: link
Be 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).