This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: regrename.c sanity check.
Richard Henderson wrote:
> On Tue, Apr 30, 2002 at 02:24:39PM -0500, Tom Rix wrote:
> > constrain_operands (1);
> > preprocess_constraints ();
> > +
> > + if (which_alternative == -1)
> > + fatal_insn_not_found (insn);
>
> Better as
>
> if (! constrain_operands (1))
> fatal_insn_not_found (insn);
>
> Ok with that change.
For completeness, here is what I checked in.
Tom
--
Tom Rix
GCC Engineer
trix@redhat.com
2002-04-30 Tom Rix <trix@redhat.com>
* regrename.c (build_def_use, copyprop_hardreg_forward_1): Sanity
check which_alternative.
Index: gcc/regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.46
diff -d -u -p -r1.46 regrename.c
--- gcc/regrename.c 25 Mar 2002 12:51:46 -0000 1.46
+++ gcc/regrename.c 30 Apr 2002 20:41:23 -0000
@@ -786,7 +786,8 @@ build_def_use (bb)
icode = recog_memoized (insn);
extract_insn (insn);
- constrain_operands (1);
+ if (! constrain_operands (1))
+ fatal_insn_not_found (insn);
preprocess_constraints ();
alt = which_alternative;
n_ops = recog_data.n_operands;
@@ -1546,7 +1547,8 @@ copyprop_hardreg_forward_1 (bb, vd)
set = single_set (insn);
extract_insn (insn);
- constrain_operands (1);
+ if (! constrain_operands (1))
+ fatal_insn_not_found (insn);
preprocess_constraints ();
alt = which_alternative;
n_ops = recog_data.n_operands;