aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-01-20 06:07:09 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-04 05:10:58 -0400
commitbbe376e136edb8456088d7298d4ba7c93d4e0529 (patch)
tree1fc4c406cbf682ba9aa64a86ae8173907e15c282 /gcc/ada/libgnat
parent8b3bf48a31e4eb238ae8bd61b9ff9d4c6abb932e (diff)
downloadgcc-bbe376e136edb8456088d7298d4ba7c93d4e0529.zip
gcc-bbe376e136edb8456088d7298d4ba7c93d4e0529.tar.gz
gcc-bbe376e136edb8456088d7298d4ba7c93d4e0529.tar.bz2
[Ada] Continuation of "Get rid of more references to Universal_Integer"
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-atopar.adb, libgnat/s-atopex.adb: Use Object_Size instead of Size, otherwise many derived types will be rejected (e.g. a type with a 14 bits 'Size and a 16 bits 'Object_Size).
Diffstat (limited to 'gcc/ada/libgnat')
-rw-r--r--gcc/ada/libgnat/s-atopar.adb6
-rw-r--r--gcc/ada/libgnat/s-atopex.adb6
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/libgnat/s-atopar.adb b/gcc/ada/libgnat/s-atopar.adb
index d4590c7..554561c 100644
--- a/gcc/ada/libgnat/s-atopar.adb
+++ b/gcc/ada/libgnat/s-atopar.adb
@@ -88,7 +88,7 @@ package body System.Atomic_Operations.Arithmetic is
pragma Warnings (On);
begin
- case Atomic_Type'Size is
+ case Atomic_Type'Object_Size is
when 8 => return Atomic_Fetch_Add_1 (Item'Address, Value);
when 16 => return Atomic_Fetch_Add_2 (Item'Address, Value);
when 32 => return Atomic_Fetch_Add_4 (Item'Address, Value);
@@ -125,7 +125,7 @@ package body System.Atomic_Operations.Arithmetic is
pragma Warnings (On);
begin
- case Atomic_Type'Size is
+ case Atomic_Type'Object_Size is
when 8 => return Atomic_Fetch_Sub_1 (Item'Address, Value);
when 16 => return Atomic_Fetch_Sub_2 (Item'Address, Value);
when 32 => return Atomic_Fetch_Sub_4 (Item'Address, Value);
@@ -142,7 +142,7 @@ package body System.Atomic_Operations.Arithmetic is
pragma Unreferenced (Item);
use type Interfaces.C.size_t;
begin
- return Boolean (Atomic_Always_Lock_Free (Atomic_Type'Size / 8));
+ return Boolean (Atomic_Always_Lock_Free (Atomic_Type'Object_Size / 8));
end Is_Lock_Free;
end System.Atomic_Operations.Arithmetic;
diff --git a/gcc/ada/libgnat/s-atopex.adb b/gcc/ada/libgnat/s-atopex.adb
index 1c2921f..4fb2824 100644
--- a/gcc/ada/libgnat/s-atopex.adb
+++ b/gcc/ada/libgnat/s-atopex.adb
@@ -66,7 +66,7 @@ package body System.Atomic_Operations.Exchange is
pragma Warnings (On);
begin
- case Atomic_Type'Size is
+ case Atomic_Type'Object_Size is
when 8 => return Atomic_Exchange_1 (Item'Address, Value);
when 16 => return Atomic_Exchange_2 (Item'Address, Value);
when 32 => return Atomic_Exchange_4 (Item'Address, Value);
@@ -124,7 +124,7 @@ package body System.Atomic_Operations.Exchange is
pragma Warnings (On);
begin
- case Atomic_Type'Size is
+ case Atomic_Type'Object_Size is
when 8 =>
return Boolean
(Atomic_Compare_Exchange_1
@@ -154,7 +154,7 @@ package body System.Atomic_Operations.Exchange is
pragma Unreferenced (Item);
use type Interfaces.C.size_t;
begin
- return Boolean (Atomic_Always_Lock_Free (Atomic_Type'Size / 8));
+ return Boolean (Atomic_Always_Lock_Free (Atomic_Type'Object_Size / 8));
end Is_Lock_Free;
end System.Atomic_Operations.Exchange;