2019-08-14 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_aux.adb (Next_Rep_Item): If a node in the rep chain
involves a Ghost aspect it may have been replaced by a null
statement; use the original node to find next Rep_Item.
* repinfo.adb (List_Entities): Do not list an Ignored
Ghost_Entity, for which information may have been deleted.
From-SVN: r274470
+2019-08-14 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_aux.adb (Next_Rep_Item): If a node in the rep chain
+ involves a Ghost aspect it may have been replaced by a null
+ statement; use the original node to find next Rep_Item.
+ * repinfo.adb (List_Entities): Do not list an Ignored
+ Ghost_Entity, for which information may have been deleted.
+
2019-08-14 Bob Duff <duff@adacore.com>
* sem_prag.ads, sem_prag.adb
if Present (Ent)
and then Nkind (Declaration_Node (Ent)) not in N_Renaming_Declaration
+ and then not Is_Ignored_Ghost_Entity (Ent)
then
-- If entity is a subprogram and we are listing mechanisms,
-- then we need to list mechanisms for this entity. We skip this
elsif Entity (N) = E then
return N;
end if;
+
+ -- A Ghost-related aspect, if disabled, may have been replaced by a
+ -- null statement.
+
+ elsif Nkind (N) = N_Null_Statement then
+ N := Original_Node (N);
end if;
Next_Rep_Item (N);