From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id D7D00398A853; Wed, 16 Jun 2021 08:46:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7D00398A853 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1521] [Ada] Do not generate an Itype_Reference node for slices in GNATprove mode X-Act-Checkin: gcc X-Git-Author: Yannick Moy X-Git-Refname: refs/heads/master X-Git-Oldrev: f4fe186bfe3e74c7c9b2d49b635565ea9a4df1b2 X-Git-Newrev: 3feba0a578c364e6ca44ad5f954a30dc55e98065 Message-Id: <20210616084609.D7D00398A853@sourceware.org> Date: Wed, 16 Jun 2021 08:46:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2021 08:46:10 -0000 https://gcc.gnu.org/g:3feba0a578c364e6ca44ad5f954a30dc55e98065 commit r12-1521-g3feba0a578c364e6ca44ad5f954a30dc55e98065 Author: Yannick Moy Date: Wed Mar 3 14:54:09 2021 +0100 [Ada] Do not generate an Itype_Reference node for slices in GNATprove mode gcc/ada/ * sem_res.adb (Set_Slice_Subtype): Revert special-case introduced previously, which is not needed as Itypes created for slices are precisely always used. Diff: --- gcc/ada/sem_res.adb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 4377f91b7b5..3ca45691585 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -12607,10 +12607,9 @@ package body Sem_Res is -- the point where actions for the slice are analyzed). Note that this -- is different from freezing the itype immediately, which might be -- premature (e.g. if the slice is within a transient scope). This needs - -- to be done only if expansion is enabled, or in GNATprove mode to - -- capture the associated run-time exceptions if any. + -- to be done only if expansion is enabled. - elsif Expander_Active or GNATprove_Mode then + elsif Expander_Active then Ensure_Defined (Typ => Slice_Subtype, N => N); end if; end Set_Slice_Subtype;