r267001 - in /trunk/gcc: ada/ChangeLog ada/free...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Tue Dec 11 11:11:00 GMT 2018


Author: pmderodat
Date: Tue Dec 11 11:11:11 2018
New Revision: 267001

URL: https://gcc.gnu.org/viewcvs?rev=267001&root=gcc&view=rev
Log:
[Ada] Crash on generic instantiation in ignored Ghost context

The following patch corrects the freezing of entities to properly
preserve all freeze nodes in case of recursive freezing when the context
is ignored Ghost, and the construct frozen is non-Ghost.

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

gcc/ada/

	* freeze.adb (Add_To_Result): Move the ignored Ghost-specific
	handling of freeze nodes to...
	(Freeze_Entity): ...here. This ensures that the freeze nodes of
	constructs that have recursive freezing are preserved when the
	context is ignored Ghost, and the top level construct being
	frozen is non-Ghost.

gcc/testsuite/

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

Added:
    trunk/gcc/testsuite/gnat.dg/ghost3.adb
    trunk/gcc/testsuite/gnat.dg/ghost3.ads
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/freeze.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list