diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efc94a4d1f24c4d8d638a1e234b9bae29a2aa8a6..a9b1e3fdacd4fa49d86f93b6c10c98fa8a3ca875 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-17 Richard Biener <rguenther@suse.de> + + * gimplify.c (gimplify_function_tree): Do not move the outer + binds block. + 2016-10-17 Jakub Jelinek <jakub@redhat.com> * langhooks.h (struct lang_hooks_for_decls): Remove diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 2f074f9532cb7f818c83229512c785fd686cc02f..254dc735f0f23dcdaa5e4ef0836f15c673c7514d 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -12373,10 +12373,7 @@ gimplify_function_tree (tree fndecl) tmp_var); gimplify_seq_add_stmt (&body, call); gimplify_seq_add_stmt (&body, tf); - 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_bind_set_block (bind, NULL); + new_bind = gimple_build_bind (NULL, body, NULL); /* Replace the current function body with the body wrapped in the try/finally TF. */ @@ -12391,10 +12388,7 @@ gimplify_function_tree (tree fndecl) { gcall *call = gimple_build_call_internal (IFN_TSAN_FUNC_EXIT, 0); gimple *tf = gimple_build_try (seq, call, GIMPLE_TRY_FINALLY); - gbind *new_bind = gimple_build_bind (NULL, tf, gimple_bind_block (bind)); - /* Clear the block for BIND, since it is no longer directly inside - the function, but within a try block. */ - gimple_bind_set_block (bind, NULL); + gbind *new_bind = gimple_build_bind (NULL, tf, NULL); /* Replace the current function body with the body wrapped in the try/finally TF. */ seq = NULL;