public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6450] [Ada] Remove redundant initialization of Test_And_Set_Flag object
@ 2022-01-11 13:26 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-01-11 13:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bf7355a7e8c8cace2c151b78ed3dc6f26ae4487f

commit r12-6450-gbf7355a7e8c8cace2c151b78ed3dc6f26ae4487f
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Mon Jan 3 14:47:18 2022 +0100

    [Ada] Remove redundant initialization of Test_And_Set_Flag object
    
    gcc/ada/
    
            * exp_ch11.adb (Expand_N_Exception_Declaration): Remove explicit
            initialization of the exceptF object.

Diff:
---
 gcc/ada/exp_ch11.adb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index b440f675183..b2eff312baf 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1089,7 +1089,7 @@ package body Exp_Ch11 is
    --  (protecting test only needed if not at library level)
 
    --     exceptF : aliased System.Atomic_Operations.Test_And_Set.
-   --                         .Test_And_Set_Flag := 0; --  static data
+   --                         .Test_And_Set_Flag; --  static data
    --     if not Atomic_Test_And_Set (exceptF) then
    --        Register_Exception (except'Unrestricted_Access);
    --     end if;
@@ -1321,9 +1321,7 @@ package body Exp_Ch11 is
                       Defining_Identifier => Flag_Id,
                       Aliased_Present     => True,
                       Object_Definition   =>
-                        New_Occurrence_Of (RTE (RE_Test_And_Set_Flag), Loc),
-                      Expression          =>
-                        Make_Integer_Literal (Loc, 0));
+                        New_Occurrence_Of (RTE (RE_Test_And_Set_Flag), Loc));
                else
                   Flag_Decl :=
                     Make_Object_Declaration (Loc,


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-11 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 13:26 [gcc r12-6450] [Ada] Remove redundant initialization of Test_And_Set_Flag object Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).