Add sanity check to regrename.c.
authorTom Rix <trix@redhat.com>
Tue, 30 Apr 2002 21:39:46 +0000 (21:39 +0000)
committerTom Rix <trix@gcc.gnu.org>
Tue, 30 Apr 2002 21:39:46 +0000 (21:39 +0000)
From-SVN: r52974

gcc/ChangeLog
gcc/regrename.c

index b8a6637ed4efc23493a3a6758b117956d1f6cb6a..1d0d6e863f92c412c61f0ddb25221c32017afd08 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-30  Tom Rix  <trix@redhat.com>
+
+       * regrename.c (build_def_use, copyprop_hardreg_forward_1): Sanity 
+       check which_alternative.
+
 2002-04-30  Kazu Hirata  <kazu@hxi.com>
 
        * cpplex.c: Fix comment formatting.
index 82f3ae97a04efdf54387792d2c1d7232b3667f9d..6463879fd8670773a18f1c867afdba4ea46943d2 100644 (file)
@@ -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;