This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r275947 - in /trunk/gcc: ada/ChangeLog ada/sem_...


Author: pmderodat
Date: Thu Sep 19 08:13:58 2019
New Revision: 275947

URL: https://gcc.gnu.org/viewcvs?rev=275947&root=gcc&view=rev
Log:
[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.

Added:
    trunk/gcc/testsuite/gnat.dg/global2.adb
    trunk/gcc/testsuite/gnat.dg/global2.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_prag.adb
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]