diff --git a/gcc/expmed.c b/gcc/expmed.c index 93298339dfc..16c2500a083 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2597,7 +2597,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) { /* No luck there. Try a quotient-and-remainder insn, keeping the quotient alone. */ - result = gen_reg_rtx (mode); + result = gen_reg_rtx (compute_mode); if (! expand_twoval_binop (unsignedp ? udivmod_optab : sdivmod_optab, adjusted_op0, op1, result, NULL_RTX, unsignedp))