public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix ICE with -O0 -fdevirtualize
@ 2013-09-06 10:35 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2013-09-06 10:35 UTC (permalink / raw)
  To: gcc-patches

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 {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-06 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-06 10:35 Fix ICE with -O0 -fdevirtualize Jan Hubicka

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).