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

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed Nov 14 11:42:00 GMT 2018


Author: pmderodat
Date: Wed Nov 14 11:42:21 2018
New Revision: 266132

URL: https://gcc.gnu.org/viewcvs?rev=266132&root=gcc&view=rev
Log:
[Ada] Spurious error on Ghost null procedure

This patch modifies the analysis (which is really expansion) of null
procedures to set the Ghost mode of the spec when the null procedure
acts as a completion.  This ensures that all nodes and entities
generated by the expansion are marked as Ghost, and provide a proper
context for references to Ghost entities.

2018-11-14  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* sem_ch6.adb (Analyze_Null_Procedure): Capture Ghost and
	SPARK-related global state at the start of the routine. Set the
	Ghost mode of the completed spec if any.  Restore the saved
	Ghost and SPARK-related global state on exit from the routine.

gcc/testsuite/

	* gnat.dg/ghost1.adb, gnat.dg/ghost1.ads: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/ghost1.adb
    trunk/gcc/testsuite/gnat.dg/ghost1.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch6.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list