2017-11-22 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/82875
+ * optabs.c (expand_doubleword_mult, expand_binop): Before calling
+ expand_binop with *mul_widen_optab, make sure at least one of the
+ operands doesn't have VOIDmode.
+
PR debug/83034
* dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
if (target && !REG_P (target))
target = NULL_RTX;
+ /* *_widen_optab needs to determine operand mode, make sure at least
+ one operand has non-VOID mode. */
+ if (GET_MODE (op0_low) == VOIDmode && GET_MODE (op1_low) == VOIDmode)
+ op0_low = force_reg (word_mode, op0_low);
+
if (umulp)
product = expand_binop (mode, umul_widen_optab, op0_low, op1_low,
target, 1, OPTAB_DIRECT);
: smul_widen_optab),
wider_mode, mode) != CODE_FOR_nothing))
{
+ /* *_widen_optab needs to determine operand mode, make sure at least
+ one operand has non-VOID mode. */
+ if (GET_MODE (op0) == VOIDmode && GET_MODE (op1) == VOIDmode)
+ op0 = force_reg (mode, op0);
temp = expand_binop (wider_mode,
unsignedp ? umul_widen_optab : smul_widen_optab,
op0, op1, NULL_RTX, unsignedp, OPTAB_DIRECT);
+2017-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/82875
+ * gcc.dg/pr82875.c: New test.
+ * gcc.c-torture/compile/pr82875.c: New test.
+
2017-11-22 Jakub Jelinek <jakub@redhat.com>
PR debug/83034