Message ID | 20220926091511.273296-1-poulhies@adacore.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1391992wrt; Mon, 26 Sep 2022 02:20:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4tW46CXd4Yvpq9avMfH3psmS74wR2ZC+F4MoTfczzn29enGi+0J74fyegVvFJ6nzphonMe X-Received: by 2002:a17:906:cc18:b0:77b:9653:464d with SMTP id ml24-20020a170906cc1800b0077b9653464dmr17037633ejb.583.1664184049974; Mon, 26 Sep 2022 02:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664184049; cv=none; d=google.com; s=arc-20160816; b=Z2NITzLTA3AAFKEelAVtB4cXqYP6zeA1AVzBMXuqjvXhFOzisvPnQEpUJdOF+CROpR EpkNI72cd6NzJsTvaUbDudLrIHxsn6m7J70QhNgqi/gC4Gm2lU45hOb/J7tZXTgUzQsZ IE5X5SbDaTCgOGrzLuQj9V30wdxywwkdTIBpqXpArw/8cKAv383OFtf4YzS0FkeOykH2 9uo0im4jj/eszpKgvBcfF7IhP68I3AEA+g7zy9sf5dduz0DLdLKQJip2eO8P3UUlX/qu ixeITDNEeOVqLwxsorOixlJhR12hD+fVUFWMPbu2xgUE/RFEWRG3RHM+5i/SB6/71geH 0ohQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=AsHGTuM/lT8VcZYqMYBIg1Pz0VsCq4KGkPYLSZ8tHgw=; b=C69V6zedMDCJY/XgD9AMAtMSgmb2nOKJsT9/Imw0fqmkD6IIDhWhC2FF2ZUccbo+d0 9Joc8Sqz+tZly3/a8ZBmWTaxADOgp9RMPh24HQdPstms3FbVZf3pxnm4WSmynmOS2xIY Qjtt5s6sRBMaTtZ9OgJCGcpui2v7cFHtoWX+FiZrO6y/txHPitNDG8Es5lBYUwkeysKM GVI49oau1XRcuqvPvuEt4IsZW5VPCUmJc0I14XPMGDlGD3zmkpZL0XAoUBHjUN3bcIw5 vlmCd8q9JZ6OXgOSo/ihb4jqgi1pL1Ew9FkgE9piEyfBD8PN+UqbOWJxdjKeX4tnzBEE xEsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=R8WxBc7y; 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 ga19-20020a1709070c1300b0073d61f9a7b6si11253374ejc.263.2022.09.26.02.20.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 02:20:49 -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=R8WxBc7y; 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 3D2E6385417B for <ouuuleilei@gmail.com>; Mon, 26 Sep 2022 09:18:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D2E6385417B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664183922; bh=AsHGTuM/lT8VcZYqMYBIg1Pz0VsCq4KGkPYLSZ8tHgw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=R8WxBc7yZb8RFA64uVNvEpHRXLUcYTjd/j/oeUOaH333A06n2mhk8HayaE0bQYHHx B4K1bhuX2XeFK+SRpwtXqFs+a9tCMTF0uC8iHm6SFEytBs7ot+lM2vqwdXmRUe8p03 E2wckxfVdZusoyAYfM4gkkqf/sKRY6Zh4ZNsU9lA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 6B288385734E for <gcc-patches@gcc.gnu.org>; Mon, 26 Sep 2022 09:15:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B288385734E Received: by mail-wr1-x435.google.com with SMTP id y5so9195229wrh.3 for <gcc-patches@gcc.gnu.org>; Mon, 26 Sep 2022 02:15:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=AsHGTuM/lT8VcZYqMYBIg1Pz0VsCq4KGkPYLSZ8tHgw=; b=Tn7xDhRvtGkp6wsTZeNszmNDR1vGHQeaziQtzfxk1WZXWepntc38hSJzimrTobiSsh XhPP7DR0Uza+8f8XPcOZqivK5XAtsy4r3K50H49RJh1o3Su4BOAERRbLRig8kUSQH5uY gf9lN4MP+UOeWqfqjRfHtkokF3N/iE9XFa+7U0enC6XQkdGAD80Kwo6NRBIl9z3TZfYO jsi1LduYL0K0xEK+cCTRYxxF3b4AC1eoNosxOIvWtztH7ZHI90dgwmF4Rj0KENHB2+n6 Rph1LLuttnRrWa49boC1VTX5zcPhkbKHqw27X2bBRQ4o18tb5hn0aCqDZfa2+ZzyLUIV YovA== X-Gm-Message-State: ACrzQf1s4SyRGYFFFzN13ZJGjxalZuNx/PnvLId68bsuwTa01dQ7LsBs TFeWAFsMawQf4uX655HOuONeTpOdxiTj7A== X-Received: by 2002:a5d:500e:0:b0:22a:44ea:dee2 with SMTP id e14-20020a5d500e000000b0022a44eadee2mr12683099wrt.325.1664183715176; Mon, 26 Sep 2022 02:15:15 -0700 (PDT) Received: from localhost.localdomain (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id n42-20020a05600c3baa00b003a319b67f64sm26937940wms.0.2022.09.26.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 02:15:14 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [COMMITED] ada: Make Original_Aspect_Pragma_Name more precise Date: Mon, 26 Sep 2022 11:15:11 +0200 Message-Id: <20220926091511.273296-1-poulhies@adacore.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.1 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 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> Cc: Tucker Taft <taft@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?1745023454192485349?= X-GMAIL-MSGID: =?utf-8?q?1745023454192485349?= |
Series |
[COMMITED] ada: Make Original_Aspect_Pragma_Name more precise
|
|
Commit Message
Marc Poulhiès
Sept. 26, 2022, 9:15 a.m. UTC
From: Tucker Taft <taft@adacore.com>
This commit makes Original_Aspect_Pragma_Name more precise in cases
where there is a second level of indirection caused by pragmas being
turned into Check pragmas.
gcc/ada/
* sem_util.adb (Original_Aspect_Pragma_Name): Check for Check
pragmas.
---
gcc/ada/sem_util.adb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index c43a008ae5d..9ae082ca2e1 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -26559,6 +26559,14 @@ package body Sem_Util is Item_Nam := Chars (Original_Node (Pragma_Identifier (Original_Node (Item)))); + if Item_Nam = Name_Check then + -- Pragma "Check" preserves the original pragma name as its first + -- argument. + Item_Nam := + Chars (Expression (First (Pragma_Argument_Associations + (Original_Node (Item))))); + end if; + else pragma Assert (Nkind (Item) = N_Aspect_Specification); Item_Nam := Chars (Identifier (Item));