From: Bill Moyer Date: Fri, 15 May 1998 17:37:51 +0000 (+0000) Subject: Patch from Bill Moyer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=829002bbab2e20744a8db95d1a5d248d8c189dcf;p=gcc.git Patch from Bill Moyer. * loop.c (basic_induction_var): Added test preventing CCmode parameter passed to convert_modes(). From-SVN: r19779 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4023bec82d..05787f8ae52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri May 15 17:36:11 1998 Bill Moyer + + * loop.c (basic_induction_var): Added test preventing + CCmode parameter passed to convert_modes(). + Fri May 15 17:26:18 1998 Alexandre Petit-Bianco * expr.c (expand_expr, case EXPR_WITH_FILE_LOCATION): Save/restore diff --git a/gcc/loop.c b/gcc/loop.c index 9625febe054..ce0b9b02631 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);