Commit 61168ff1 by Roger Sayle Committed by Roger Sayle

re PR middle-end/18096 (internal compiler error: in final_scan_insn, at final.c:2429)


	PR middle-end/18096
	* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Check that
	the stack adjustment, "size", is valid for Pmode.  If the stack
	frame is too large, generate a trap insn and issue a warning.

	* gcc.dg/pr18096-1.c: New test case.

From-SVN: r89896
parent 41724e6a
2004-10-30 Roger Sayle <roger@eyesopen.com>
PR middle-end/18096
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Check that
the stack adjustment, "size", is valid for Pmode. If the stack
frame is too large, generate a trap insn and issue a warning.
2004-10-30 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-dom.c: Fix comment typos.
......
......@@ -13111,7 +13111,14 @@ rs6000_emit_allocate_stack (HOST_WIDE_INT size, int copy_r12)
rtx insn;
rtx stack_reg = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM);
rtx tmp_reg = gen_rtx_REG (Pmode, 0);
rtx todec = GEN_INT (-size);
rtx todec = gen_int_mode (-size, Pmode);
if (INTVAL (todec) != -size)
{
warning("stack frame too large");
emit_insn (gen_trap ());
return;
}
if (current_function_limit_stack)
{
......
2004-10-30 Roger Sayle <roger@eyesopen.com>
PR middle-end/18096
* gcc.dg/pr18096-1.c: New test case.
2004-10-30 Roger Sayle <roger@eyesopen.com>
* gcc.dg/pr17581-1.c: Add missing prototype for abort.
2004-10-30 Joseph S. Myers <joseph@codesourcery.com>
......
/* PR middle-end/18096 */
/* { dg-do compile { target powerpc-*-* } } */
/* { dg-options "-O2" } */
void f(char*);
void mkcatdefs(char *fname)
{
char line [2147483647];
f(line);
} /* { dg-warning "stack frame too large" "stack frame too large" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment