From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id AF80E3838E68 for ; Thu, 2 Jun 2022 09:09:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF80E3838E68 Received: by mail-ed1-x52a.google.com with SMTP id x5so341920edi.2 for ; Thu, 02 Jun 2022 02:09:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=y5DIcJ19T7GqsAdWDRTuH+wAgIlKXYV23OKSYRuY/N8=; b=zrg52mNgcFLii6Dfcm7q/dafyrb7zBl97MIU3y6twfuFtzCDcaHtrb3zbuKqmJSHGV YMIdtBukN6n8NmAcg1yiN2z3eFtYjzngBYm1/g16yFqCZRXSnfE1ogx250v1T/GbCVUV kKv/9u5YcO2A0IouE+h8XyV2s53Nvf1L9rUz3eLvy4lGhoV0pF3hprO4jqOZHNM+R57D kyxQ5em1u8hEW6n/ZSHw7bellESY0HU/j64tSzu+iHUSWyvHbaVLHesO8eUdUErrWM0T hOqcosABxa9txFy1Cj2l2nIPywTwhvNTy/5c4jXR6fsVBKoTk1lrk9UivuOBNmjc0FVu nXxg== X-Gm-Message-State: AOAM5325r7IKm3bDTZOOsREiBAQfzT9dMi608wHv7EVnVhWOPb2urMbY cwyW5SfH+07HSjlwQX8QRqEid27XPjEYmA== X-Google-Smtp-Source: ABdhPJzICDVO/uoVjDUc28w2SCzIOWUslmmgnazgE2+oz1xgDHiFQvvRifxcklmxUjWxVTHgSHyatg== X-Received: by 2002:a05:6402:1f0e:b0:42d:e38a:51f7 with SMTP id b14-20020a0564021f0e00b0042de38a51f7mr4288434edb.68.1654160949548; Thu, 02 Jun 2022 02:09:09 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id b8-20020aa7c6c8000000b0042617ba637bsm2279480eds.5.2022.06.02.02.09.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 02:09:08 -0700 (PDT) Date: Thu, 2 Jun 2022 09:09:08 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix references to old variables that have been refactored Message-ID: <20220602090908.GA1010889@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline X-Spam-Status: No, score=-13.2 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-List-Received-Date: Thu, 02 Jun 2022 09:09:12 -0000 --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Local_Entity_Suppress and Global_Entity_Suppress variables referencing tables were refactored to Local_Suppress_Stack_Top and Global_Suppress_Stack_Top stacks back in 2007. Fix remaining references to these variables. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads: Fix reference to Global_Entity_Suppress and Local_Entity_Suppress variable in the comments. * sem.ads: Likewise. * sem_prag.adb: Likewise. --AqsLC8rIMeq19msA Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -605,10 +605,10 @@ package Einfo is -- Checks_May_Be_Suppressed -- Defined in all entities. Set if a pragma Suppress or Unsuppress --- mentions the entity specifically in the second argument. If this --- flag is set the Global_Entity_Suppress and Local_Entity_Suppress --- tables must be consulted to determine if there actually is an active --- Suppress or Unsuppress pragma that applies to the entity. +-- mentions the entity specifically in the second argument. If this flag +-- is set the global and local suppress stacks must be consulted to +-- determine if there actually is an active Suppress or Unsuppress pragma +-- that applies to the entity. -- Class_Postconditions -- Defined on subprogram entities. Set if the subprogram has class-wide diff --git a/gcc/ada/sem.ads b/gcc/ada/sem.ads --- a/gcc/ada/sem.ads +++ b/gcc/ada/sem.ads @@ -327,8 +327,8 @@ package Sem is -- using pragma Check_Name), are handled as follows. If a suppress or -- unsuppress pragma is encountered for a given entity, then the flag -- Checks_May_Be_Suppressed is set in the entity and an entry is made in - -- either the Local_Entity_Suppress stack (case of pragma that appears in - -- other than a package spec), or in the Global_Entity_Suppress stack (case + -- either the local suppress stack (case of pragma that appears in + -- other than a package spec), or in the global suppress stack (case -- of pragma that appears in a package spec, which is by the rule of RM -- 11.5(7) applicable throughout the life of the entity). Similarly, a -- Suppress/Unsuppress pragma for a non-predefined check which does not @@ -340,7 +340,7 @@ package Sem is -- other point is that we have to make sure that we have proper nested -- interaction between such specific pragmas and locally applied general -- pragmas applying to all entities. This is achieved by including in the - -- Local_Entity_Suppress table dummy entries with an empty Entity field + -- local suppress stack dummy entries with an empty Entity field -- that are applicable to all entities. A similar search is needed for any -- non-predefined check even if no specific entity is involved. @@ -359,18 +359,18 @@ package Sem is -- applies, and gives the right result when such pragmas are used even -- in complex cases of nested Suppress and Unsuppress pragmas. - -- The Local_Entity_Suppress and Global_Entity_Suppress stacks are handled - -- using dynamic allocation and linked lists. We do not often use this - -- approach in the compiler (preferring to use extensible tables instead). - -- The reason we do it here is that scope stack entries save a pointer to - -- the current local stack top, which is also saved and restored on scope - -- exit. Furthermore for processing of generics we save pointers to the - -- top of the stack, so that the local stack is actually a tree of stacks - -- rather than a single stack, a structure that is easy to represent using - -- linked lists, but impossible to represent using a single table. Note - -- that because of the generic issue, we never release entries in these - -- stacks, but that's no big deal, since we are unlikely to have a huge - -- number of Suppress/Unsuppress entries in a single compilation. + -- The local and global suppress stacks are handled using dynamic + -- allocation and linked lists. We do not often use this approach in the + -- compiler (preferring to use extensible tables instead). The reason we do + -- it here is that scope stack entries save a pointer to the current local + -- stack top, which is also saved and restored on scope exit. Furthermore + -- for processing of generics we save pointers to the top of the stack, so + -- that the local stack is actually a tree of stacks rather than a single + -- stack, a structure that is easy to represent using linked lists, but + -- impossible to represent using a single table. Note that because of the + -- generic issue, we never release entries in these stacks, but that's no + -- big deal, since we are unlikely to have a huge number of + -- Suppress/Unsuppress entries in a single compilation. type Suppress_Stack_Entry; type Suppress_Stack_Entry_Ptr is access all Suppress_Stack_Entry; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -11000,7 +11000,7 @@ package body Sem_Prag is Scope_Suppress.Suppress (C) := Suppress_Case; end if; - -- Also make an entry in the Local_Entity_Suppress table + -- Also push an entry in the local suppress stack Push_Local_Suppress_Stack_Entry (Entity => Empty, --AqsLC8rIMeq19msA--