From patchwork Mon May 29 08:29:23 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: 70222 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 02DF93839DCF for ; Mon, 29 May 2023 08:34:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02DF93839DCF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685349280; bh=HUKWoRMcRlPhyTvLxc6NFIJL8o5UDIDnhKkir7q14Yo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=YVhyh+teGrxtWgi/sscgtNrz99mwBuXnR1vjl39qVLDSebkgdThWOJ7/odA1hX1pm lRXRPaViun8fhpdo6GwW2M3kmywmrn0XIQFlWQIH7EpNEpQLY+df8PDCNJxaYs7X5o z8WsVvQtmmS4p4QfO8mehSo7OcnpZ5TiS0KRnk7M= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 00C8D385624F for ; Mon, 29 May 2023 08:29:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00C8D385624F Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-30ac4e7f37bso1723801f8f.2 for ; Mon, 29 May 2023 01:29:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685348964; x=1687940964; 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=HUKWoRMcRlPhyTvLxc6NFIJL8o5UDIDnhKkir7q14Yo=; b=ZxSDkgYUXTkE86IoS7LRPNvzNd3r/o3Z2E68AGTcM9MpuOnqQAYaCQj2Xi39aKgvZC ObnJcbKcNYJQ3OBI8NaLH5SeBj1Q6mkCnwu/AXuPlltO6vXomKQGpWsuGe6JKuFDK72f eX3dXPBXfeTPBqXP14uf+580DAF/B2wVtO2K6SYip8+X+oBdXbOUU4l1OwDAJ+JZwASL U18vCxpPgn9eVfQqZntM+iWDRmtrkVkOa1KRzzs59eUkxrzb7aDGoPBgqSp+vjENm9LJ ZJH07rFSqEtxL/y/cogl5uQzcsL2e5CdQQv10LZiJWN22CRTbpg8PLs4xnj96ZvbSBu6 Rqdw== X-Gm-Message-State: AC+VfDzYi0y/5PtxxXmzHlsELo79a08JwW6JVGRbwWJBo2Z1Xxk+9Cyq VuOKlA53HVFBh6WHLx3cU8Db3+AIK3UTT/oyUAGkkg== X-Google-Smtp-Source: ACHHUZ6l1b4QuDYDgoBigK8VNzeqGWilUlyLc6pLzczsNsgl53/mloMxcQ/GgDEUEcaw2BRUJ3q0Mg== X-Received: by 2002:a5d:640c:0:b0:30a:a478:f559 with SMTP id z12-20020a5d640c000000b0030aa478f559mr9098318wru.2.1685348964864; Mon, 29 May 2023 01:29:24 -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 e12-20020a5d65cc000000b0030af05fce4dsm686521wrw.77.2023.05.29.01.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:29:24 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Accept parameters of enclosing subprograms in exceptional cases Date: Mon, 29 May 2023 10:29:23 +0200 Message-Id: <20230529082923.2410140-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: Piotr Trojanek Rules about parameters of modes OUT and IN OUT in aspect Exceptional_Cases only apply to the parameters of the current subprogram. gcc/ada/ * sem_res.adb (Resolve_Entity_Name): Refine rules for Exceptional_Cases. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 6d4bef8d38e..066072a6afe 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8122,6 +8122,7 @@ package body Sem_Res is -- data from the object. if Ekind (E) in E_Out_Parameter | E_In_Out_Parameter + and then Scope (E) = Current_Scope and then Within_Exceptional_Cases_Consequence (N) and then not In_Attribute_Old (N) and then not (Nkind (Parent (N)) = N_Attribute_Reference