From 88d1c2ad47c6c456d90c349f8dc3ec680514cdb8 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 24 May 2007 22:12:31 +0000 Subject: 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 --- gcc/regclass.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/regclass.c') diff --git a/gcc/regclass.c b/gcc/regclass.c index 635f2d3..23fd092 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -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)) -- cgit v1.1