From patchwork Fri Jul 9 18:13:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1503310 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4GM1Vk05SQz9sS8 for ; Sat, 10 Jul 2021 04:13:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 826773991488 for ; Fri, 9 Jul 2021 18:13:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 3E6E9385803F for ; Fri, 9 Jul 2021 18:13:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E6E9385803F 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 23529 invoked from network); 9 Jul 2021 18:13:02 -0000 X-APM-Out-ID: 16258543822352 X-APM-Authkey: 257869/1(257869/1) 9 Received: from unknown (HELO ?192.168.1.214?) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 9 Jul 2021 18:13:02 -0000 From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: [pushed] coroutines: Fix a typo in rewriting the function. Message-Id: <105514C2-2976-41AA-9E24-2079DCC347AC@sandoe.co.uk> Date: Fri, 9 Jul 2021 19:13:02 +0100 To: GCC Patches X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-16.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, 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, When amending the function re-write code, I made a typo in the block connections. This has not shown up in any test fails (as far as can be seen) but is a regression in debug info. Fixed thus. tested on x86_64-darwin, linux, pushed to master as obvious, I plan to back-port it where needed unless any objection is raised. thanks Iain Signed-off-by: Iain Sandoe gcc/cp/ChangeLog: * coroutines.cc (coro_rewrite_function_body): Connect the replacement function block to the block nest correctly. --- 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 a1b0b31f497..f5ae2d6d101 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -4055,8 +4055,8 @@ coro_rewrite_function_body (location_t fn_start, tree fnbody, tree orig, BIND_EXPR_BLOCK (first) = replace_blk; /* The top block has one child, so far, and we have now got a superblock. */ - BLOCK_SUPERCONTEXT (block) = top_block; - BLOCK_SUBBLOCKS (top_block) = block; + BLOCK_SUPERCONTEXT (replace_blk) = top_block; + BLOCK_SUBBLOCKS (top_block) = replace_blk; } /* Wrap the function body in a try {} catch (...) {} block, if exceptions