This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR54826
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dehao Chen <dehao at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 6 Oct 2012 09:03:16 +0200
- Subject: Re: [PATCH] Fix PR54826
- References: <CAO2gOZVmK41nbR2rPM0uY1vUCW5xTFr7BMFqLMKw_dQpA+vhcw@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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