summaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 97983a864b1..a0d6645e595 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -1512,7 +1512,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
op1x = convert_to_mode (word_mode, op1, 1);
}
- if (GET_MODE (op0) != mode)
+ if (GET_MODE (op0) != VOIDmode
+ && GET_MODE (op0) != mode)
op0 = convert_to_mode (mode, op0, unsignedp);
/* Pass 1 for NO_QUEUE so we don't lose any increments