[Ada] Handle correctly current instance of PO in local subprogram Global
authorYannick Moy <moy@adacore.com>
Wed, 30 Sep 2020 08:50:24 +0000 (10:50 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 24 Nov 2020 10:16:01 +0000 (05:16 -0500)
commit91592d05cd924351d99ca8dd8f01df77d74170d9
tree50ff6b9ce47412aa59f67dca44a21ad47077618d
parentac9ed5cb2659c9a4049dffd58bc120762d140744
[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.
gcc/ada/sem_prag.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads