[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.