From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 43713388215C for ; Thu, 13 Jun 2024 13:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 43713388215C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 43713388215C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285643; cv=none; b=MkhidnTLOlsvI/arXtUBw98ZBwjx2SS/MZg3ychCjwN1JW4ZyxsJsq7zOTNGTfAD37flbEQc41cinQQviTW47jCYhGoKlvyVNDGZ9jg4RUj5/QwpIywT2ZbEjoTDeV46CnbJJdmY7tRv9ymYCmu7d1yLz0EpI7KWMvF8j3iGsuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285643; c=relaxed/simple; bh=JuMSgI6WByAxXNVVUVxCT1wZdCDr5LAIoew3xAHj0z4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=daYoqcZpl0pSpj16Vvwvhq9LIk1WLY/LxcYD+Un4DlBkPkgWM97DMxpiHcH3jAkMbdgylfJ9G0t3Gmd1tx/oz9nIf0/VsjT0tG7NwRbxqyCk8jvWSGKg7sxHPxDrRfVw+826VLDI1dDy+OOVyMwT4SiWZv2IFRSL9KLux3STxno= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42189d3c7efso11975865e9.2 for ; Thu, 13 Jun 2024 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285640; x=1718890440; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HwIVZXZmYkfW5n9HtGd3ZXVuwVjT6nR+qARClD4uLyE=; b=BSZuwPq/FA6DxG40nSfxcynLJT8NnDDuUJFndKKZqy45+c3yW0spnC6E17q3Wk5xQ8 NKbPwpj9M5u+7D/5BDo56cCLE/sxI09NCt5AU7lRLA112yTHsZEshY6wo8oun1NkfDsQ He2ZlksPYJRYJ1Rt6ubfESZ92aHwo9EccnY019y6CRmnTEthZb6xpFSc/hnmNRD072EY NOyxFjbUwQaLj8OH2eVhkHvm2NBRCb0l0U0sUREsU/N+Wyw+LaebdL48NPyBc0uiJxJH 6Jd3M6C5WbiSKHzZJIDyfH624bgvA3Ieau5g9La7wgnjPuUl/A/PKbMT7Va+nvanyuCN UjUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285640; x=1718890440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HwIVZXZmYkfW5n9HtGd3ZXVuwVjT6nR+qARClD4uLyE=; b=lWzEus/DvCy0CcTKLMhBDb3EW5RpqZtv0YSsZWSXIxl3T4oWpFo7kMW3fTl3gW8pu0 HBmqu3rHvaXQTqnqhau9EFgQd0OuZq9egOoQXjdr/3yzSvNUGVFp0vUArhIDSgap14LD GqgqngQpv+rIC64QWOL4s1l2+rn6VhPIssrjEZVKt0sHbnPoIdgtJ6rAGSrWF7RX3qMl RU38nm94i4c+G2VwAfAJDmBb46QU8BFM/gGHrOORFCgd2RjjhR+EQtB+C0z5mi2t63J6 jWXkNtU/MluJlD+2hQX9WECglFfzQiODnplmzDC17MeB1kIpkbrQzytqFIC+cfxt12tf VpQg== X-Gm-Message-State: AOJu0Yy7iBQ+eFwaP1HJ0XAgUhQPSipeV1cYN2nJo3BUvUwrJ+BIAO18 u10HnOBGJRkXIcB3LPBO/LPkuEgkTz9ZIQx6XqaNtrV8SAYhnoONyySvqaK+vl1FMHwipOhx394 = X-Google-Smtp-Source: AGHT+IHBKF5vVVAszUsuVxm+zZP+k2Fy5lVRUBXr0/2jRvTbs5VOOCDC5pB8P+Y9i0gS4PtRbcb5+Q== X-Received: by 2002:a05:600c:a54:b0:422:7a16:6986 with SMTP id 5b1f17b1804b1-422863b458fmr48293625e9.9.1718285640135; Thu, 13 Jun 2024 06:34:00 -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 5b1f17b1804b1-422870e9145sm62391955e9.22.2024.06.13.06.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:59 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED 13/30] ada: Fix oversight in latest finalization fix Date: Thu, 13 Jun 2024 15:33:19 +0200 Message-ID: <20240613133338.1809385-13-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 List-Id: From: Eric Botcazou The Defining_Identifier of a renaming may be a E_Constant in the context. gcc/ada/ PR ada/114710 * exp_util.adb (Find_Renamed_Object): Recurse for any renaming. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index bf95b0e13c8..6e2168a80e9 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -8881,7 +8881,7 @@ package body Exp_Util is -- Recurse if Ren_Obj is itself a renaming if Present (Ren_Obj) - and then Ekind (Ren_Obj) = E_Variable + and then Ekind (Ren_Obj) in E_Constant | E_Variable and then Present (Renamed_Object (Ren_Obj)) then return Find_Renamed_Object (Declaration_Node (Ren_Obj)); -- 2.45.1