* calls.c (expand_call): Disallow passing huge arguments
by value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205628
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
{
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)