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 <de...@google.com> * 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)