[Ada] SPARK: update for effectively volatile types and objects
authorYannick Moy <moy@adacore.com>
Tue, 2 Jun 2020 16:24:16 +0000 (18:24 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 16 Oct 2020 07:31:19 +0000 (03:31 -0400)
commit476a8ec4d8ecf3437dc3e78e7de2bd77d34fdbd5
tree1919b61186f5c3fcf47b5a465214683f6c6a3c38
parent057469588864b2566f89e3a548a80d7517b34c98
[Ada] SPARK: update for effectively volatile types and objects

gcc/ada/

* sem_prag.adb (Analyze_Global_In_Decl_Part): Update check to
reject volatile object for reading.
* sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Update
check to reject volatile object for reading.
* sem_util.adb, sem_util.ads
(Check_Nonvolatile_Function_Profile,
Has_Effectively_Volatile_Profile): Detect use of volatile object
for reading.
(Has_Enabled_Property): Accept constants as well.
(Is_Effectively_Volatile_For_Reading): New function based on
existing Is_Effectively_Volatile.
(Is_Effectively_Volatile_Object_For_Reading): Adapted from the
existing Is_Effectively_Volatile_Object, using a shared
implementation in Is_Effectively_Volatile_Object_Shared.
gcc/ada/sem_prag.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads