[Ada] Make GNAT.Array_Split a preelaborable unit
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 11 Jun 2018 09:18:44 +0000 (09:18 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 11 Jun 2018 09:18:44 +0000 (09:18 +0000)
This patch makes GNAT.Array_Split a preelaborable unit. As a result, it can be
withed by other preelaborated untis.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* libgnat/g-arrspl.ads: Add pragma Preelaborate.

gcc/testsuite/

* gnat.dg/gnat_array_split1.adb, gnat.dg/gnat_array_split1.ads: New
testcase.

From-SVN: r261419

gcc/ada/ChangeLog
gcc/ada/libgnat/g-arrspl.ads
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/gnat_array_split1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/gnat_array_split1.ads [new file with mode: 0644]

index 97dbbf3f41d94d0cc51cde1619081b9600eebc7d..85b344e46927a485d3aa22cdef983555907b2958 100644 (file)
@@ -1,3 +1,7 @@
+2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * libgnat/g-arrspl.ads: Add pragma Preelaborate.
+
 2018-06-11  Arnaud Charlet  <charlet@adacore.com>
 
        * exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
index 62d4042389d60b55bc5668e9c731c7b689da0bf1..efcc2d41008e91c1f8f432acf94adfa7d8164e33 100644 (file)
@@ -56,6 +56,7 @@ generic
    --  Returns True if Item is found in Set, False otherwise
 
 package GNAT.Array_Split is
+   pragma Preelaborate;
 
    Index_Error : exception;
    --  Raised by all operations below if Index > Field_Count (S)
index e9a5c15aafd5ca5eb1cc7e1dba1f5c4c9c8406f8..9b5eccaa7c50f7ccdaae80c270025e075217ccad 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * gnat.dg/gnat_array_split1.adb, gnat.dg/gnat_array_split1.ads: New
+       testcase.
+
 2018-06-11  Javier Miranda  <miranda@adacore.com>
 
        * gnat.dg/prot4.adb: New testcase.
diff --git a/gcc/testsuite/gnat.dg/gnat_array_split1.adb b/gcc/testsuite/gnat.dg/gnat_array_split1.adb
new file mode 100644 (file)
index 0000000..edac820
--- /dev/null
@@ -0,0 +1,5 @@
+--  { dg-do compile }
+
+package body GNAT_Array_Split1 is
+   procedure Dummy is null;
+end GNAT_Array_Split1;
diff --git a/gcc/testsuite/gnat.dg/gnat_array_split1.ads b/gcc/testsuite/gnat.dg/gnat_array_split1.ads
new file mode 100644 (file)
index 0000000..9c3ea9f
--- /dev/null
@@ -0,0 +1,6 @@
+with GNAT.Array_Split;
+
+package GNAT_Array_Split1 is
+   pragma Preelaborate;
+   procedure Dummy;
+end GNAT_Array_Split1;