re PR target/30848 (ICE with invalid constraint in asm statement)
PR target/30848 * reg-stack.c (emit_swap_insn): If a malformed asm was seen, silently fix up the stack in the case of a missing register. From-SVN: r122669
This commit is contained in:
parent
1611915067
commit
7476f0866c
|
@ -1,3 +1,9 @@
|
||||||
|
2007-03-07 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
PR target/30848
|
||||||
|
* reg-stack.c (emit_swap_insn): If a malformed asm was seen,
|
||||||
|
silently fix up the stack in the case of a missing register.
|
||||||
|
|
||||||
2007-03-07 Paul Brook <paul@codesourcery.com>
|
2007-03-07 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* config/arm/libunwind.S: Add .arch/.object_arch for armv4 builds.
|
* config/arm/libunwind.S: Add .arch/.object_arch for armv4 builds.
|
||||||
|
|
|
@ -815,9 +815,19 @@ emit_swap_insn (rtx insn, stack regstack, rtx reg)
|
||||||
|
|
||||||
hard_regno = get_hard_regnum (regstack, reg);
|
hard_regno = get_hard_regnum (regstack, reg);
|
||||||
|
|
||||||
gcc_assert (hard_regno >= FIRST_STACK_REG);
|
|
||||||
if (hard_regno == FIRST_STACK_REG)
|
if (hard_regno == FIRST_STACK_REG)
|
||||||
return;
|
return;
|
||||||
|
if (hard_regno == -1)
|
||||||
|
{
|
||||||
|
/* Something failed if the register wasn't on the stack. If we had
|
||||||
|
malformed asms, we zapped the instruction itself, but that didn't
|
||||||
|
produce the same pattern of register sets as before. To prevent
|
||||||
|
further failure, adjust REGSTACK to include REG at TOP. */
|
||||||
|
gcc_assert (any_malformed_asm);
|
||||||
|
regstack->reg[++regstack->top] = REGNO (reg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gcc_assert (hard_regno >= FIRST_STACK_REG);
|
||||||
|
|
||||||
other_reg = regstack->top - (hard_regno - FIRST_STACK_REG);
|
other_reg = regstack->top - (hard_regno - FIRST_STACK_REG);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
|
||||||
|
void foo(double d)
|
||||||
|
{
|
||||||
|
__asm__ ("" : "=u" (d)); /* { dg-error "output regs" } */
|
||||||
|
}
|
Loading…
Reference in New Issue