From patchwork Thu Jun 15 08:04:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 71158 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 35A5D3945C2E for ; Thu, 15 Jun 2023 08:08:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35A5D3945C2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686816528; bh=ZKCvX43IzHCu/O99b7k7dNNwKEYKYqXupVrbjOBKCbA=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=cyLpeo2nvFvt2gwOSd4k/1X5XCmU5qG76dX5EHHQb8WKHYU3hD4jNZNnREOTAP3D4 DpR5HvwfzYrTnLAh4shOwtp/aerLNw310knRozNkzETHkmzE16ptj7fXX3dyZUWhNG z0Q6koYywRfvhniQII7QftPoaDhSWubJmZwLV+0E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 578AF385781F for ; Thu, 15 Jun 2023 08:04:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 578AF385781F Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f61d79b0f2so10320224e87.3 for ; Thu, 15 Jun 2023 01:04:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686816266; x=1689408266; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZKCvX43IzHCu/O99b7k7dNNwKEYKYqXupVrbjOBKCbA=; b=fLNRUm+BXoeFrDPGTssPb6oIxoza/CQD7bJK80CBWgpM+nn+Q8upvqv3NSC7sqrnUs 8t+/RBdPul+g5Zs/XvFmT+xmS1Gw7ORMCvBkTgMsI/fqZCHh+itu6cKFpfqX0u5IeGP1 4DvKe+aNg4JW4GUoDVbqgJq7LAEbayeiJgPr+BGRmof/MeeW8N3W1nUgThBZwD76oR2Y kNGSOANHE2b8zLaiqyi6mZ8hu5kFcSpB+zb54gEVDhvf60CBl7lpWwyGv597ovAAKRYH AeGqmVFwnDCC5WHo5yjZZBZG+3spwThHtCpa4uYSqOJ4OPKZIGyZ0L7ewXF9C7TeIQYq BzBg== X-Gm-Message-State: AC+VfDx7sFqPTOEt7RQ9XolKNYVlYzXJm9tA/psLIJuplwuH9hxTaL1p c0ewgek1gPmQTJ1+3nf4CSYh3ekPem2I9i+NW02MqA== X-Google-Smtp-Source: ACHHUZ4MKOZNzf37+Y8PkBZZ5YpigSPRQOFAkdOJJkdjp366qVmvT11UpoGNLItPmOiJTbxVGPw8Dg== X-Received: by 2002:ac2:5b5b:0:b0:4f6:4ba0:7f4b with SMTP id i27-20020ac25b5b000000b004f64ba07f4bmr10167781lfp.68.1686816265742; Thu, 15 Jun 2023 01:04:25 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c378600b003f42d8dd7d1sm19858868wmr.7.2023.06.15.01.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 01:04:25 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Revert latest change to Find_Hook_Context Date: Thu, 15 Jun 2023 10:04:24 +0200 Message-Id: <20230615080424.939984-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Eric Botcazou The issue is that, if an aggregate is both below a conditional expression and above another conditional expression in the tree, we have currently no place to put the finalization actions generated by the innermost expression in the context of the aggregate before it is expanded, so they end up being placed after the outermost expression. But it is not clear whether that's really problematic because this does not seem to happen for array aggregates with multiple or others choices: in this case the aggregate is expanded first and the code path is not taken. gcc/ada/ * exp_util.adb (Find_Hook_Context): Revert latest change. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index a4aa5f64447..91959793638 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6500,16 +6500,6 @@ package body Exp_Util is then Top := Par; - -- Stop at contexts where temporaries may be contained - - elsif Nkind (Par) in N_Aggregate - | N_Delta_Aggregate - | N_Extension_Aggregate - | N_Block_Statement - | N_Loop_Statement - then - exit; - -- Prevent the search from going too far elsif Is_Body_Or_Package_Declaration (Par) then