[Ada] Ignore pragma Elaborate_Body in spec of a SAL_Interface package
authorBob Duff <duff@adacore.com>
Tue, 22 May 2018 13:23:12 +0000 (13:23 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 22 May 2018 13:23:12 +0000 (13:23 +0000)
2018-05-22  Bob Duff  <duff@adacore.com>

gcc/ada/

* binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
the spec of a SAL_Interface package.

From-SVN: r260517

gcc/ada/ChangeLog
gcc/ada/binde.adb

index 378ccad0a6c6933c0b29c55d0af91d01f4635e62..6f73f881d2f1d7631fc2436b2f2cd6dd71d6c6d4 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-22  Bob Duff  <duff@adacore.com>
+
+       * binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
+       the spec of a SAL_Interface package.
+
 2018-05-22  Ed Schonberg  <schonberg@adacore.com>
 
        * freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
index 6874b915fead56a4433e18a06e07cdf100727d37..72a67161a28b1403a7d2fab50b681847e1a55034 100644 (file)
@@ -1123,6 +1123,14 @@ package body Binde is
            and then Units.Table (Chosen).RCI
          then
             null;
+
+         --  If this unit is an interface to a stand-alone library, then we
+         --  don't want to elaborate the body -- that will happen as part of
+         --  the library.
+
+         elsif Units.Table (Chosen).SAL_Interface then
+            null;
+
          else
             Choose
               (Elab_Order => Elab_Order,