+2018-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/84828
+ * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
+ destination if any_malformed_asm.
+
2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/85496
}
/* The destination ought to be dead. */
- gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG);
-
- replace_reg (psrc, get_hard_regnum (regstack, src));
+ if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG)
+ gcc_assert (any_malformed_asm);
+ else
+ {
+ replace_reg (psrc, get_hard_regnum (regstack, src));
- regstack->reg[++regstack->top] = REGNO (dest);
- SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest));
- replace_reg (pdest, FIRST_STACK_REG);
+ regstack->reg[++regstack->top] = REGNO (dest);
+ SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest));
+ replace_reg (pdest, FIRST_STACK_REG);
+ }
}
else if (STACK_REG_P (src))
{