From: Jakub Jelinek Date: Fri, 3 Oct 2008 19:28:09 +0000 (+0200) Subject: gimplify.c (gimplify_function_tree): For -finstrument-functions use gimple_bind_... X-Git-Tag: releases/gcc-4.4.0~2178 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32001f69b9db91182b382495c41c316bedb7e5cc;p=thirdparty%2Fgcc.git gimplify.c (gimplify_function_tree): For -finstrument-functions use gimple_bind_{,set_}block instead of... * gimplify.c (gimplify_function_tree): For -finstrument-functions use gimple_bind_{,set_}block instead of gimple_{,set_}block. * gimple.h (gimple_bind_set_block): Allow second argument to be NULL. From-SVN: r140858 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96499931370c..5c477137f091 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2008-10-03 Jakub Jelinek + * gimplify.c (gimplify_function_tree): For -finstrument-functions + use gimple_bind_{,set_}block instead of gimple_{,set_}block. + * gimple.h (gimple_bind_set_block): Allow second argument to be NULL. + PR debug/37726 * gimplify.c (declare_vars): Use gimple_bind_block instead of gimple_block. diff --git a/gcc/gimple.h b/gcc/gimple.h index a390590d7054..a6947c33405d 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -2602,7 +2602,7 @@ static inline void gimple_bind_set_block (gimple gs, tree block) { GIMPLE_CHECK (gs, GIMPLE_BIND); - gcc_assert (TREE_CODE (block) == BLOCK); + gcc_assert (block == NULL_TREE || TREE_CODE (block) == BLOCK); gs->gimple_bind.block = block; } diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 5123efdf321d..2befb43ecff4 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7366,10 +7366,10 @@ gimplify_function_tree (tree fndecl) x = implicit_built_in_decls[BUILT_IN_PROFILE_FUNC_ENTER]; gimplify_seq_add_stmt (&body, gimple_build_call (x, 0)); gimplify_seq_add_stmt (&body, tf); - new_bind = gimple_build_bind (NULL, body, gimple_block (bind)); + new_bind = gimple_build_bind (NULL, body, gimple_bind_block (bind)); /* Clear the block for BIND, since it is no longer directly inside the function, but within a try block. */ - gimple_set_block (bind, NULL); + gimple_bind_set_block (bind, NULL); /* Replace the current function body with the body wrapped in the try/finally TF. */