From patchwork Sat Oct 6 02:24:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix PR54826 Date: Fri, 05 Oct 2012 16:24:53 -0000 From: Dehao Chen X-Patchwork-Id: 189660 Message-Id: To: GCC Patches Hi, 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 * gimple-low.c (lower_stmt): Set the block for call args. Index: gcc/gimple-low.c =================================================================== --- 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)