This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR54826


On Fri, Oct 05, 2012 at 07:24:53PM -0700, Dehao Chen wrote:
> This patch fixes PR54826. When lowering the gimple, the block for call
> arg also need to be reset.
> 
> Bootstrapped and passed gcc regression test on x86.
> 
> Okay for trunk?
> 
> Thanks,
> Dehao
> 
> 2012-10-05  Dehao Chen  <dehao@google.com>
> 
>         * gimple-low.c (lower_stmt): Set the block for call args.

Yes, thanks.

> --- gcc/gimple-low.c	(revision 192147)
> +++ gcc/gimple-low.c	(working copy)
> @@ -425,7 +425,15 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lowe
>      case GIMPLE_CALL:
>        {
>  	tree decl = gimple_call_fndecl (stmt);
> +	unsigned i;
>  
> +	for (i = 0; i < gimple_call_num_args (stmt); i++)
> +	  {
> +	    tree arg = gimple_call_arg (stmt, i);
> +	    if (EXPR_P (arg))
> +	      TREE_SET_BLOCK (arg, data->block);
> +	  }
> +
>  	if (decl
>  	    && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL
>  	    && DECL_FUNCTION_CODE (decl) == BUILT_IN_SETJMP)


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]