Commit ddc923b5 by Marek Polacek Committed by Marek Polacek

re PR middle-end/56344 (ICE for program with very large structs returned by value)

	PR middle-end/56344
	* calls.c (expand_call): Disallow passing huge arguments
	by value.

From-SVN: r205628
parent da0fc454
2013-12-03 Marek Polacek <polacek@redhat.com>
PR middle-end/56344
* calls.c (expand_call): Disallow passing huge arguments
by value.
2013-12-03 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/59362
......@@ -3045,6 +3045,15 @@ expand_call (tree exp, rtx target, int ignore)
{
rtx before_arg = get_last_insn ();
/* We don't allow passing huge (> 2^30 B) arguments
by value. It would cause an overflow later on. */
if (adjusted_args_size.constant
>= (1 << (HOST_BITS_PER_INT - 2)))
{
sorry ("passing too large argument on stack");
continue;
}
if (store_one_arg (&args[i], argblock, flags,
adjusted_args_size.var != 0,
reg_parm_stack_space)
......
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