diff options
author | Yannick Moy <moy@adacore.com> | 2020-09-30 10:50:24 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-24 05:16:01 -0500 |
commit | 91592d05cd924351d99ca8dd8f01df77d74170d9 (patch) | |
tree | 50ff6b9ce47412aa59f67dca44a21ad47077618d /gcc/ada/sem_util.ads | |
parent | ac9ed5cb2659c9a4049dffd58bc120762d140744 (diff) | |
download | gcc-91592d05cd924351d99ca8dd8f01df77d74170d9.zip gcc-91592d05cd924351d99ca8dd8f01df77d74170d9.tar.gz gcc-91592d05cd924351d99ca8dd8f01df77d74170d9.tar.bz2 |
[Ada] Handle correctly current instance of PO in local subprogram Global
gcc/ada/
* sem_prag.adb (Analyze_Global_Item): Handle specially the
current instance of a PO.
* sem_util.ads (Is_Effectively_Volatile,
Is_Effectively_Volatile_For_Reading): Add parameter
Ignore_Protected.
* sem_util.adb (Is_Effectively_Volatile,
Is_Effectively_Volatile_For_Reading): Add parameter
Ignore_Protected to compute the query results ignoring protected
objects/types.
(Is_Effectively_Volatile_Object,
Is_Effectively_Volatile_Object_For_Reading): Adapt to new
signature.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 1b993f9..cd9b05c 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1879,7 +1879,9 @@ package Sem_Util is -- . machine_emax = 2**10 -- . machine_emin = 3 - machine_emax - function Is_Effectively_Volatile (Id : Entity_Id) return Boolean; + function Is_Effectively_Volatile + (Id : Entity_Id; + Ignore_Protected : Boolean := False) return Boolean; -- Determine whether a type or object denoted by entity Id is effectively -- volatile (SPARK RM 7.1.2). To qualify as such, the entity must be either -- * Volatile without No_Caching @@ -1887,9 +1889,14 @@ package Sem_Util is -- * An array type whose component type is effectively volatile -- * A protected type -- * Descendant of type Ada.Synchronous_Task_Control.Suspension_Object + -- + -- If Ignore_Protected is True, then a protected object/type is treated + -- like a non-protected record object/type for computing the result of + -- this query. function Is_Effectively_Volatile_For_Reading - (Id : Entity_Id) return Boolean; + (Id : Entity_Id; + Ignore_Protected : Boolean := False) return Boolean; -- Determine whether a type or object denoted by entity Id is effectively -- volatile for reading (SPARK RM 7.1.2). To qualify as such, the entity -- must be either @@ -1901,6 +1908,10 @@ package Sem_Util is -- reading -- * A protected type -- * Descendant of type Ada.Synchronous_Task_Control.Suspension_Object + -- + -- If Ignore_Protected is True, then a protected object/type is treated + -- like a non-protected record object/type for computing the result of + -- this query. function Is_Effectively_Volatile_Object (N : Node_Id) return Boolean; |