aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/rtsfind.adb
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2021-05-24 14:38:07 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-08 13:34:18 +0000
commit5478d8a7aefbec4d93d32237fb29b9fdb8347b6b (patch)
treebcb2b5e4c70a293b89ab1518d970c3c9f4fd3e01 /gcc/ada/rtsfind.adb
parent076c1a91574d5abcd32898ec1a1a5975254c32a3 (diff)
downloadgcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.zip
gcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.tar.gz
gcc-5478d8a7aefbec4d93d32237fb29b9fdb8347b6b.tar.bz2
[Ada] Unsynchronized concurrent access to a Boolean variable
gcc/ada/ * rtsfind.ads, rtsfind.adb: Add support for finding the packages System.Atomic_Operations and System.Atomic_Operations.Test_And_Set and the declarations within that latter package of the type Test_And_Set_Flag and the function Atomic_Test_And_Set. * exp_ch11.adb (Expand_N_Exception_Declaration): If an exception is declared other than at library level, then we need to call Register_Exception the first time (and only the first time) the declaration is elaborated. In order to decide whether to perform this call for a given elaboration of the declaration, we used to unconditionally use a (library-level) Boolean variable. Now we instead use a variable of type System.Atomic_Operations.Test_And_Set.Test_And_Set_Flag unless either that type is unavailable or a No_Tasking restriction is in effect (in which case we use a Boolean variable as before).
Diffstat (limited to 'gcc/ada/rtsfind.adb')
-rw-r--r--gcc/ada/rtsfind.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index 6fe6f85..5a89076 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -602,6 +602,10 @@ package body Rtsfind is
subtype System_Descendant is RTU_Id
range System_Address_Image .. System_Tasking_Stages;
+ subtype System_Atomic_Operations_Descendant is System_Descendant
+ range System_Atomic_Operations_Test_And_Set ..
+ System_Atomic_Operations_Test_And_Set;
+
subtype System_Dim_Descendant is System_Descendant
range System_Dim_Float_IO .. System_Dim_Integer_IO;
@@ -689,6 +693,10 @@ package body Rtsfind is
elsif U_Id in System_Descendant then
Name_Buffer (7) := '.';
+ if U_Id in System_Atomic_Operations_Descendant then
+ Name_Buffer (25) := '.';
+ end if;
+
if U_Id in System_Dim_Descendant then
Name_Buffer (11) := '.';
end if;