re PR rtl-optimization/32069 (segfault in regclass() with -O0 -fsplit-wide-types)

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

From-SVN: r125043
This commit is contained in:
Ian Lance Taylor 2007-05-24 22:12:31 +00:00 committed by Ian Lance Taylor
parent 0f17a91f46
commit 88d1c2ad47
3 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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.
2007-05-24 Ollie Wild <aaw@google.com>
* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__

View File

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

View File

@ -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;
}