summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-15 17:37:51 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-15 17:37:51 +0000
commit3b5f953ea920b85e913488f6e9f48d5e88614050 (patch)
tree1b08f512804bdd6979b2acc9173efe1d13a6f613 /gcc/loop.c
parente8832c238ee8feb3b05a9f60c15b05305fb58622 (diff)
downloadgcc-3b5f953ea920b85e913488f6e9f48d5e88614050.tar.gz
Patch from Bill Moyer.
* loop.c (basic_induction_var): Added test preventing CCmode parameter passed to convert_modes(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19779 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c7
1 files changed, 6 insertions, 1 deletions
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);