[Ada] Fix handling of access-to-variable objects in Global and Depends
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 6 Jan 2021 11:47:28 +0000 (12:47 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 4 May 2021 09:17:33 +0000 (05:17 -0400)
commit7f9f8889fedbe3cbba3cad870508bfc0336b3940
treec77194f8fdab01bdb733208e6c9cc4e5e9d6a86b
parent7367cd5949ec066811979dbb60b51cbcc6c123b3
[Ada] Fix handling of access-to-variable objects in Global and Depends

gcc/ada/

* sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
comment; this routine is no longer used by GNATprove.
* sem_prag.adb (Find_Role): The IN parameter is on output only
when it belongs to non-function; also, the otherwise constant
object can only be written by a non-function.
(Collect_Global_Item): The IN parameter can only be written when
it belongs to non-function; also, unnest this check to make it
easier to read.
gcc/ada/sem_prag.adb
gcc/ada/sem_prag.ads