ghost.adb (Prune_Node): A freeze node for an ignored ghost entity must be pruned as well.

2016-07-04  Ed Schonberg  <schonberg@adacore.com>

	* ghost.adb (Prune_Node): A freeze node for an ignored ghost
	entity must be pruned as well.

From-SVN: r237967
This commit is contained in:
Ed Schonberg 2016-07-04 10:29:02 +00:00 committed by Arnaud Charlet
parent 607114db6a
commit 7c14db4032
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* ghost.adb (Prune_Node): A freeze node for an ignored ghost
entity must be pruned as well.
2016-07-04 Gary Dismukes <dismukes@adacore.com>
* sem_type.adb, einfo.ads, freeze.adb, exp_ch6.adb: Minor reformatting

View File

@ -1174,6 +1174,15 @@ package body Ghost is
Prune (N);
return Skip;
-- A freeze node for an ignored ghost entity must be pruned as
-- well, to prevent meaningless references in the back end.
elsif Nkind (N) = N_Freeze_Entity
and then Is_Ignored_Ghost_Entity (Entity (N))
then
Prune (N);
return Skip;
-- Scoping constructs such as blocks, packages, subprograms and
-- bodies offer some flexibility with respect to pruning.