This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[rs6000] fix gcc.c-torture/compile/20071117-1.c ice
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Feb 2008 15:32:47 +1030
- Subject: [rs6000] fix gcc.c-torture/compile/20071117-1.c ice
At -O0, this invalid rtl is generated by explow.c:emit_stack_restore
(insn 29 28 30 3 .../20071117-1.c:10 (set (mem/c:SI (mem/f/c/i:SI (plus:SI (reg/f:SI 115 virtual-stack-vars)
(const_int 4 [0x4])) [0 p+0 S4 A32]) [0 S4 A8])
(reg:SI 134)) -1 (nil))
because p in "__builtin_stack_restore (p);" has decl rtl of the inner
mem above rather than a reg.
Bootstrapped and regression tested powerpc-linux. OK to apply?
All active branches?
* config/rs6000/rs6000.md (restore_stack_block): Force operands[1]
to a reg.
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- gcc/config/rs6000/rs6000.md (revision 132232)
+++ gcc/config/rs6000/rs6000.md (working copy)
@@ -10465,6 +10465,7 @@
""
"
{
+ operands[1] = force_reg (Pmode, operands[1]);
operands[2] = gen_reg_rtx (Pmode);
operands[3] = gen_frame_mem (Pmode, operands[0]);
operands[4] = gen_frame_mem (Pmode, operands[1]);
--
Alan Modra
Australia Development Lab, IBM