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

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon Jun 11 09:18:00 GMT 2018


Author: pmderodat
Date: Mon Jun 11 09:18:01 2018
New Revision: 261412

URL: https://gcc.gnu.org/viewcvs?rev=261412&root=gcc&view=rev
Log:
[Ada] Do not force Part_Of on generic units

This fixes the code checking SPARK RM 7.2.6(3) so that generic child units
are not forced to use Part_Of to relate their abstract state to the state
of their parent.

2018-06-11  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
	unit.
	(Check_Missing_Part_Of): Do not force Part_Of on generic unit.

gcc/testsuite/

	* gnat.dg/part_of1-instantiation.adb,
	gnat.dg/part_of1-instantiation.ads,
	gnat.dg/part_of1-private_generic.adb,
	gnat.dg/part_of1-private_generic.ads, gnat.dg/part_of1.ads: New
	testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/part_of1-instantiation.adb
    trunk/gcc/testsuite/gnat.dg/part_of1-instantiation.ads
    trunk/gcc/testsuite/gnat.dg/part_of1-private_generic.adb
    trunk/gcc/testsuite/gnat.dg/part_of1-private_generic.ads
    trunk/gcc/testsuite/gnat.dg/part_of1.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_prag.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list