From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 17E963839C48; Tue, 5 Jul 2022 08:31:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17E963839C48 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 r13-1495] [Ada] Remove repeated setting of Never_Set_In_Source X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 6ba8c078cabee2c6abc669971e1351536ce721ec X-Git-Newrev: c96dcf055028510b5b1630e12015b86d5f5c2f6e Message-Id: <20220705083110.17E963839C48@sourceware.org> Date: Tue, 5 Jul 2022 08:31:10 +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: Tue, 05 Jul 2022 08:31:10 -0000 https://gcc.gnu.org/g:c96dcf055028510b5b1630e12015b86d5f5c2f6e commit r13-1495-gc96dcf055028510b5b1630e12015b86d5f5c2f6e Author: Piotr Trojanek Date: Wed Jun 8 20:52:48 2022 +0200 [Ada] Remove repeated setting of Never_Set_In_Source Formal parameters have their flag Never_Set_In_Source set at the beginning of Process_Formals routine (regardless of the parameter mode). There is no need to set it again when Process_Formals calls Set_Formal_Mode (for parameters of mode IN OUT and OUT). Code cleanup related to improved detection of uninitialised objects; behaviour is unaffected. gcc/ada/ * sem_ch6.adb (Set_Formal_Mode): Remove unnecessary setting of Never_Set_In_Source. Diff: --- gcc/ada/sem_ch6.adb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 1efc8842db9..8334647028a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -13298,10 +13298,9 @@ package body Sem_Ch6 is Mutate_Ekind (Formal_Id, E_In_Out_Parameter); else - Mutate_Ekind (Formal_Id, E_Out_Parameter); - Set_Never_Set_In_Source (Formal_Id, True); - Set_Is_True_Constant (Formal_Id, False); - Set_Current_Value (Formal_Id, Empty); + Mutate_Ekind (Formal_Id, E_Out_Parameter); + Set_Is_True_Constant (Formal_Id, False); + Set_Current_Value (Formal_Id, Empty); end if; else