* ghost.adb (Prune_Node): A freeze node for an ignored ghost
entity must be pruned as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237967
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
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.