This patch ensures that with clauses that mention ignored Ghost units are
retained in the tree. The retention is necessary for several reasons:
* The with clauses allow the new elaboration order mechanism to
produce the same library edges regardless of whether the Ghost unit
is checked or ignored. This ensures that the elaboration order
remains consistent.
* The with clauses allow the unnesting mechanism to properly
recognize that all units have been examined for unnesing purposes.
No observable impact, no test needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Hristian Kirtchev <kirtc...@adacore.com>
gcc/ada/
* sem_ch10.adb: Remove the with and use clause for unit Ghost.
(Analyze_With_Clause): Do not mark a with clause which mentions
an ignored Ghost code for elimination.
--- gcc/ada/sem_ch10.adb
+++ gcc/ada/sem_ch10.adb
@@ -34,7 +34,6 @@ with Elists; use Elists;
with Fname; use Fname;
with Fname.UF; use Fname.UF;
with Freeze; use Freeze;
-with Ghost; use Ghost;
with Impunit; use Impunit;
with Inline; use Inline;
with Lib; use Lib;
@@ -2912,8 +2911,6 @@ package body Sem_Ch10 is
Set_Fatal_Error (Current_Sem_Unit, Error_Ignored);
end if;
end case;
-
- Mark_Ghost_Clause (N);
end Analyze_With_Clause;
------------------------------