Commit 9070115b by Eric Botcazou Committed by Eric Botcazou

function.c (assign_stack_local_1): Issue an error message if the frame size…

function.c (assign_stack_local_1): Issue an error message if the frame size overflows in the signed target arithmetics.

	* function.c (assign_stack_local_1): Issue an error message if
	the frame size overflows in the signed target arithmetics.

From-SVN: r106717
parent 7e854c00
2005-11-09 Eric Botcazou <ebotcazou@adacore.com>
* function.c (assign_stack_local_1): Issue an error message if
the frame size overflows in the signed target arithmetics.
2005-11-09 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (build_qualified_type): Chain the new type to the original
type's TYPE_NEXT_PTR_TO or TYPE_NEXT_REF_TO linked lists if it is
a POINTER_TYPE or a REFERENCE_TYPE respectively.
......
......@@ -479,6 +479,19 @@ assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align,
function->x_stack_slot_list
= gen_rtx_EXPR_LIST (VOIDmode, x, function->x_stack_slot_list);
/* Try to detect frame size overflows. */
if ((FRAME_GROWS_DOWNWARD
? (unsigned HOST_WIDE_INT) -function->x_frame_offset
: (unsigned HOST_WIDE_INT) function->x_frame_offset)
> ((unsigned HOST_WIDE_INT) 1 << (BITS_PER_WORD - 1))
/* Leave room for the fixed part of the frame. */
- 64 * UNITS_PER_WORD)
{
error ("%Jtotal size of local objects too large", function->decl);
/* Avoid duplicate error messages as much as possible. */
function->x_frame_offset = 0;
}
return x;
}
......
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