public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH COMMITTED: Fix for PR 32069: -O0 -fsplit-wide-types
@ 2007-05-24 22:19 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2007-05-24 22:19 UTC (permalink / raw)
  To: gcc-patches

PR 32069 is about an ICE when using -fsplit-wide-types -O0.  This is
an odd combination.  But of course the compiler should not crash.
This patch fixes it.

Bootstrapped and tested on i686-pc-linux-gnu.  Committed.

Ian


2007-05-24  Ian Lance Taylor  <iant@google.com>

	PR rtl-optimization/32069
	* regclass.c (regclass): Don't crash if the entry in regno_reg_rtx
	is NULL.


Index: regclass.c
===================================================================
--- regclass.c	(revision 125032)
+++ regclass.c	(working copy)
@@ -1214,6 +1214,9 @@ regclass (rtx f, int nregs)
 	  int class;
 	  struct costs *p = &costs[i];
 
+	  if (regno_reg_rtx[i] == NULL)
+	    continue;
+
 	  /* In non-optimizing compilation REG_N_REFS is not initialized
 	     yet.  */
 	  if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i))
Index: testsuite/gcc.dg/pr32069.c
===================================================================
--- testsuite/gcc.dg/pr32069.c	(revision 0)
+++ testsuite/gcc.dg/pr32069.c	(revision 0)
@@ -0,0 +1,7 @@
+/* { dg-do-compile } */
+/* { dg-options "-O0 -fsplit-wide-types" } */
+
+long long int segfault (long long int a, long long int b)
+{
+  return a ^ b;
+}

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

only message in thread, other threads:[~2007-05-24 22:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-24 22:19 PATCH COMMITTED: Fix for PR 32069: -O0 -fsplit-wide-types Ian Lance Taylor

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