]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Retention of with clauses for ignored Ghost units
authorHristian Kirtchev <kirtchev@adacore.com>
Tue, 21 Aug 2018 14:49:26 +0000 (14:49 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 21 Aug 2018 14:49:26 +0000 (14:49 +0000)
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.

2018-08-21  Hristian Kirtchev  <kirtchev@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.

From-SVN: r263733

gcc/ada/ChangeLog
gcc/ada/sem_ch10.adb

index 1d21061cd28b38d8d9debc9b09767dc8752c1846..373a648b98634cab97ccc41c2f5b473c85b5a801 100644 (file)
@@ -1,3 +1,9 @@
+2018-08-21  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * 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.
+
 2018-08-21  Javier Miranda  <miranda@adacore.com>
 
        * lib-writ.adb (Write_Unit_Information): Handle pragmas removed
index 39ed04681aa64b479353fae2f03d1d06f44e5325..e6d0ba50f4ba19809b4aa3c8f5c881b391119820 100644 (file)
@@ -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;
 
    ------------------------------