[PATCH] Fix PR56344

Marek Polacek polacek@redhat.com
Mon Dec 2 19:19:00 GMT 2013


On Mon, Dec 02, 2013 at 05:40:33PM +0100, Marek Polacek wrote:
> On Mon, Dec 02, 2013 at 04:01:05PM +0100, Richard Biener wrote:
> > On Wed, Mar 13, 2013 at 1:57 PM, Marek Polacek <polacek@redhat.com> wrote:
> > > Ping.
> > 
> > Ok.  (yay, oldest patch in my review queue ...)
> 
> ;) thanks.  Just to be sure, did you mean to ok this patch (that is,
> the one with HOST_BITS_PER_INT)?
> 
> Bootstrap/regtest in progress.
> 
> 2013-12-02  Marek Polacek  <polacek@redhat.com>
> 
> 	PR middle-end/56344
> 	* calls.c (expand_call): Disallow passing huge arguments
> 	by value.
> 
> --- gcc/calls.c.mp4	2013-12-02 17:12:18.621057873 +0100
> +++ gcc/calls.c	2013-12-02 17:32:35.523684716 +0100
> @@ -3047,6 +3047,15 @@ expand_call (tree exp, rtx target, int i
>  	    {
>  	      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 - 1)))

Surely I meant to use "HOST_BITS_PER_INT - 2" here.

	Marek



More information about the Gcc-patches mailing list