From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 85D703858411; Wed, 1 Sep 2021 13:23:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85D703858411 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3289] coroutines: No cleanups on goto statements. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/heads/master X-Git-Oldrev: fcc0c84cf5d29de431172347a28366ee0b428a86 X-Git-Newrev: 8406ed9af2655479a9c8469d7acca2cf5784f5d6 Message-Id: <20210901132334.85D703858411@sourceware.org> Date: Wed, 1 Sep 2021 13:23:34 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 13:23:34 -0000 https://gcc.gnu.org/g:8406ed9af2655479a9c8469d7acca2cf5784f5d6 commit r12-3289-g8406ed9af2655479a9c8469d7acca2cf5784f5d6 Author: Iain Sandoe Date: Wed Mar 3 16:13:00 2021 +0000 coroutines: No cleanups on goto statements. Minor cleanup, this is statement not an expression, we do not need to use finish_expr_stmt here. Signed-off-by: Iain Sandoe gcc/cp/ChangeLog: * coroutines.cc (await_statement_walker): Use build_stmt and add_stmt instead of build1 and finish_expr_stmt. Diff: --- gcc/cp/coroutines.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 25269d9e51a..3bb33cc9eb9 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -3824,8 +3824,8 @@ await_statement_walker (tree *stmt, int *do_subtree, void *d) the parameter to return_value(). */ if (!maybe_await_stmt) maybe_await_stmt = tsi_stmt_ptr (tsi_last (ret_list)); - expr = build1_loc (loc, GOTO_EXPR, void_type_node, awpts->fs_label); - finish_expr_stmt (expr); + TREE_USED (awpts->fs_label) = 1; + add_stmt (build_stmt (loc, GOTO_EXPR, awpts->fs_label)); *stmt = pop_stmt_list (ret_list); /* Once this is complete, we will have processed subtrees. */ *do_subtree = 0;