From patchwork Wed Sep 1 13:28:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1523159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H04dl0BrQz9tk3 for ; Wed, 1 Sep 2021 23:28:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A123385BF92 for ; Wed, 1 Sep 2021 13:28:55 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp001-out.apm-internet.net (smtp001-out.apm-internet.net [85.119.248.222]) by sourceware.org (Postfix) with ESMTPS id 672313857C5B for ; Wed, 1 Sep 2021 13:28:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 672313857C5B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 58463 invoked from network); 1 Sep 2021 13:28:23 -0000 X-APM-Out-ID: 16305029025845 X-APM-Authkey: 257869/1(257869/1) 22 Received: from unknown (HELO ?192.168.1.214?) (81.138.1.83) by smtp001.apm-internet.net with SMTP; 1 Sep 2021 13:28:23 -0000 From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [pushed] coroutines : Add a missed begin/finish else clause to the codegen. Message-Id: <0A8BADF1-4ECD-43D0-924D-D6EAA932E835@sandoe.co.uk> Date: Wed, 1 Sep 2021 14:28:22 +0100 To: GCC Patches X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-15.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, Minor code-gen correction. tested on x86_64, powerpc64 - linux, x86_64-darwin, pushed to master as trivial/obvious, thanks Iain Signed-off-by: Iain Sandoe gcc/cp/ChangeLog: * coroutines.cc (build_actor_fn): Add begin/finish clauses to the initial test in the actor function. --- gcc/cp/coroutines.cc | 2 ++ 1 file changed, 2 insertions(+) -- diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index 3bb33cc9eb9..ceb3d3be75e 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -2331,6 +2331,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, finish_switch_stmt (destroy_dispatcher); finish_then_clause (lsb_if); + begin_else_clause (lsb_if); tree dispatcher = begin_switch_stmt (); finish_switch_cond (rat, dispatcher); @@ -2368,6 +2369,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, /* Insert the prototype dispatcher. */ finish_switch_stmt (dispatcher); + finish_else_clause (lsb_if); finish_if_stmt (lsb_if);