This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] m32c: ICE in global_alloc, at global.c:514
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Jun 2007 00:02:20 +0200
- Subject: [PATCH] m32c: ICE in global_alloc, at global.c:514
Quoting Kenneth Zadeck in the PR:
"The problem here is that the port is defining EH_RETURN_STACKADJ_RTX to
be the pseudo reg (reg:HI 49). This sounds very wrong to me.
The df scanning code is making this an artificial use in the exit block.
However, there are no other uses or defs of reg 49 in this function.
This causes problems."
The internals manual says (about EH_RETURN_STACKADJ_RTX):
"Typically this is a call-clobbered hard register that is otherwise untouched
by the epilogue, but could also be a stack slot."
The patch changes the m32c port to use a call-clobbered hard register. It
now builds for C and C++ with --disable-multilib and --enable-cxx-flags=-O2
as work arounds for unrelated problems. OK for trunk?
:ADDPATCH m32c:
2007-06-27 Rask Ingemann Lambertsen <rask@sygehus.dk>
PR target/32418
* config/m32c/m32c.c (m32c_eh_return_stackadj_rtx): Dataflow fix:
Use a call-clobbered hard register instead of a pseudo reg.
Index: gcc/config/m32c/m32c.c
===================================================================
--- gcc/config/m32c/m32c.c (revision 125892)
+++ gcc/config/m32c/m32c.c (working copy)
@@ -1143,7 +1143,7 @@ m32c_eh_return_stackadj_rtx (void)
{
rtx sa;
- sa = gen_reg_rtx (Pmode);
+ sa = gen_rtx_REG (Pmode, R0_REGNO);
cfun->machine->eh_stack_adjust = sa;
}
return cfun->machine->eh_stack_adjust;
--
Rask Ingemann Lambertsen