Message ID | 20230529082851.2409033-1-poulhies@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1360356vqr; Mon, 29 May 2023 01:30:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7u7riq2ssrTS9dBwhW+3GbPZCAyj5HxEYbTK1S6CvW0QoOGnCKw6MhOky2yFrSDarYa+h0 X-Received: by 2002:aa7:ccd8:0:b0:514:a179:b151 with SMTP id y24-20020aa7ccd8000000b00514a179b151mr942921edt.41.1685349017147; Mon, 29 May 2023 01:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685349017; cv=none; d=google.com; s=arc-20160816; b=OIQbOJeBgbR8L7bLGD0VOb9oDFQusU9qFJ7x9iOd5FK/PjxAwxKolyUQiB7cS9ZQ19 DBWgsvGKJl3KgU5NFmOq7JdUypEcAK415AgnslVAP2UVspW/0XxekX1OtMnuwMWQ/Ig+ zYTjHabz3/PjT5JddJOJtYhsDmZCQABwUY/ka6bN1Frvmt7C4Aqs05fnXdVQVfGb9pAN QCeAgalypCGCcG/46UxlUGEtc3OShhzfryg4CVXUvq7lWeUPzXs8z8SZnD0y6kzwrfBV WlmrUZ9BHAReIV6D31w0EBTnBOCQ7Mvf5u1re+fav56jVTi/1KFwiH5BxNIf9qJVRCSJ pfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=R8o0y4OH7BMHEUnKvjUHEo3KsJZs/W0Jl3l28EmdoNQ=; b=TqBsbyUdQT+CNZ6U0oPSIEHjo6B61Y0mLaW6oJdH2CbseelVt/HKmd6KVWwtqfLeqO xGsfxe9tq38owzvlHRUxGm7SGZw1YWXeOJSJq8eSZypNgNzA9iQeSTGqwTZJ9a3ncEC2 cxmxBb/laWHEEsbp8Y2FUzdraEXRIPc1NV+Ki4ZO6fNtlQonKZj7Bbn2d/pfkQNIpaT+ 0BEoRJLEPk5+76GPgoWdjR4ePSjxdHOqFb5mIy+Rs15KZliqwUrGSVJkAqW0/GY7wO7C 9caj/ki35nrTH8kTjJsjejAopqSvMtujTdWv1D21Fx2RieYLYSunlXSq/Xeaa2yy9Ol5 hO5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=AkT8oBsx; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p9-20020aa7d309000000b0050c064800a9si1981865edq.100.2023.05.29.01.30.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:30:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=AkT8oBsx; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9EE6538438FD for <ouuuleilei@gmail.com>; Mon, 29 May 2023 08:29:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EE6538438FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685348985; bh=R8o0y4OH7BMHEUnKvjUHEo3KsJZs/W0Jl3l28EmdoNQ=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=AkT8oBsxxfjOj2aSsz2SBPxKasCrZTYQMUsAyGz58hcZpfz7ftDm4fP6QdYujqNZk Aumh/zNcArnNQ40ITlOCUxLGquyS2PTlExAjMZ9n8PnRfUIdHD+doxVZVDiFkUsBaW gpb4UI2re+VxYSvZBDo0+AaGPJCm+mrbq9N1tJTY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id AEA4E385770F for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 08:28:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEA4E385770F Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f61530506aso31645325e9.1 for <gcc-patches@gcc.gnu.org>; Mon, 29 May 2023 01:28:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685348932; x=1687940932; 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=R8o0y4OH7BMHEUnKvjUHEo3KsJZs/W0Jl3l28EmdoNQ=; b=QZQmImrjk6dLb1tTEmNHOmgf/OWqJJburJKQf3ThROK//y/tmF9B19oPt0sw/pBmm6 OmGJS2eRay8+nb4Lrv6mWIHsaC6WHxNQUMWnBmRAgf+ZMVu8ad9hmqqHj601B0Z3j4aA svx25i28SgXAD2gUTgOLt0GGi9rPw2i8dO35LRBjCHKdaBmTWCaoLT8x/szSw1kk7Yqk R3tqunEHj5F0eT4HkXWzd6XNPF6Kk+Uw5phNpi0sNewgIYER3egCd80HVRyx8eqoGdQQ u1eA3ce7c8Vt6rHtHyjdWTM7s7loCHBy3d77LcopZipTcQbDKKnzYF/h/odF4MutQgzp dCzA== X-Gm-Message-State: AC+VfDxs62LNWJ6Tn3PALJxXVJqV6hyc8wZaA9g5VjqcYpfd46Ll6uBt Rc8+awpCDwDlRBuOGfTlX5NQdCuZRd1YHxmXjqsWng== X-Received: by 2002:a1c:7405:0:b0:3f6:3b9:eaeb with SMTP id p5-20020a1c7405000000b003f603b9eaebmr7984843wmc.6.1685348932548; Mon, 29 May 2023 01:28:52 -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 q21-20020a1ce915000000b003f421979398sm16967273wmc.26.2023.05.29.01.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:28:52 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> Subject: [COMMITTED] ada: Fix restoration of parent link Date: Mon, 29 May 2023 10:28:51 +0200 Message-Id: <20230529082851.2409033-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767216531212557773?= X-GMAIL-MSGID: =?utf-8?q?1767216531212557773?= |
Series |
[COMMITTED] ada: Fix restoration of parent link
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
May 29, 2023, 8:28 a.m. UTC
When resetting the parent link after having restored the selected component node, the assertion used was incorrectly triggered when the traversal hits the members of the parameters association list, as in: This.Some_Func (Param1, Param2).Dispatching_Call When restoring the selected component for Dispatching_Call, the assertion was wrongly triggered when passed Param1 and Param2. gcc/ada/ * contracts.adb (Restore_Original_Selected_Component): Adjust assertion. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/contracts.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index 012ea33cf89..9d02887cfa1 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -4954,7 +4954,8 @@ package body Contracts is begin if Par /= Parent_Node then - pragma Assert (not Is_List_Member (Node)); + pragma Assert (not Is_List_Member (Node) + or else Nkind (Par) = N_Function_Call); Set_Parent (Node, Parent_Node); end if;