[Ada] Allow constants of access type in Global contracts
Now that SPARK supports access types, global constants of access type
may appear as outputs of a subprogram, with the meaning that the
underlying memory can be modified (see SPARK RM 3.10).
2019-09-19 Yannick Moy <moy@adacore.com>
gcc/ada/
* sem_prag.adb (Analyze_Global_In_Decl_Part): Do not issue an
error when a constant of an access type is used as output in a
Global contract.
(Analyze_Depends_In_Decl_Part): Do not issue an error when a
constant of an access type is used as output in a Depends
contract.
gcc/testsuite/
* gnat.dg/global2.adb, gnat.dg/global2.ads: New testcase.
From-SVN: r275947