aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Moyer <ttk@cygnus.com>1998-05-15 17:37:51 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-05-15 10:37:51 -0700
commit829002bbab2e20744a8db95d1a5d248d8c189dcf (patch)
tree1b08f512804bdd6979b2acc9173efe1d13a6f613
parentb24f65cddd02f22d6ae7f3d7a89904fe3041b9ae (diff)
downloadgcc-829002bbab2e20744a8db95d1a5d248d8c189dcf.zip
gcc-829002bbab2e20744a8db95d1a5d248d8c189dcf.tar.gz
gcc-829002bbab2e20744a8db95d1a5d248d8c189dcf.tar.bz2
Patch from Bill Moyer.
* loop.c (basic_induction_var): Added test preventing CCmode parameter passed to convert_modes(). From-SVN: r19779
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d4023be..05787f8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 15 17:36:11 1998 Bill Moyer <ttk@cygnus.com>
+
+ * loop.c (basic_induction_var): Added test preventing
+ CCmode parameter passed to convert_modes().
+
Fri May 15 17:26:18 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* expr.c (expand_expr, case EXPR_WITH_FILE_LOCATION): Save/restore
diff --git a/gcc/loop.c b/gcc/loop.c
index 9625feb..ce0b9b0 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -5257,7 +5257,12 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val)
case CONST_INT:
case SYMBOL_REF:
case CONST:
- if (loops_enclosed == 1)
+ /* convert_modes aborts if we try to convert to or from CCmode, so just
+ exclude that case. It is very unlikely that a condition code value
+ would be a useful iterator anyways. */
+ if (loops_enclosed == 1
+ && GET_MODE_CLASS (mode) != MODE_CC
+ && GET_MODE_CLASS (GET_MODE (dest_reg)) != MODE_CC)
{
/* Possible bug here? Perhaps we don't know the mode of X. */
*inc_val = convert_modes (GET_MODE (dest_reg), mode, x, 0);