Do not go beyond end of array
authorMichael Meissner <meissner@gcc.gnu.org>
Wed, 2 Jul 1997 13:52:15 +0000 (13:52 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Wed, 2 Jul 1997 13:52:15 +0000 (13:52 +0000)
From-SVN: r14384

gcc/loop.c

index 92eab1f9821163130d731a3006ce260a38e947c7..1c67f1c51597a5d1ce19d9c5eb12964323214a50 100644 (file)
@@ -3961,6 +3961,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
                              other_giv = tv;
                          }
                      if (! tv && other_giv
+                         && REGNO (other_giv->dest_reg) <= max_reg_before_loop
                          && (REGNO_LAST_UID (REGNO (other_giv->dest_reg))
                              == INSN_UID (v->insn))
                          && INSN_LUID (v->insn) < INSN_LUID (bl->biv->insn))