From 24d124a42aefdb882f393f6c2211d9c9c3914c70 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Mon, 11 Jun 2018 09:18:44 +0000 Subject: [PATCH] [Ada] Make GNAT.Array_Split a preelaborable unit 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 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 | 4 ++++ gcc/ada/libgnat/g-arrspl.ads | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gnat.dg/gnat_array_split1.adb | 5 +++++ gcc/testsuite/gnat.dg/gnat_array_split1.ads | 6 ++++++ 5 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gnat.dg/gnat_array_split1.adb create mode 100644 gcc/testsuite/gnat.dg/gnat_array_split1.ads diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 97dbbf3f41d..85b344e4692 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-06-11 Hristian Kirtchev + + * libgnat/g-arrspl.ads: Add pragma Preelaborate. + 2018-06-11 Arnaud Charlet * exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and diff --git a/gcc/ada/libgnat/g-arrspl.ads b/gcc/ada/libgnat/g-arrspl.ads index 62d4042389d..efcc2d41008 100644 --- a/gcc/ada/libgnat/g-arrspl.ads +++ b/gcc/ada/libgnat/g-arrspl.ads @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9a5c15aafd..9b5eccaa7c5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-06-11 Hristian Kirtchev + + * gnat.dg/gnat_array_split1.adb, gnat.dg/gnat_array_split1.ads: New + testcase. + 2018-06-11 Javier Miranda * 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 index 00000000000..edac820dad0 --- /dev/null +++ b/gcc/testsuite/gnat.dg/gnat_array_split1.adb @@ -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 index 00000000000..9c3ea9fafa9 --- /dev/null +++ b/gcc/testsuite/gnat.dg/gnat_array_split1.ads @@ -0,0 +1,6 @@ +with GNAT.Array_Split; + +package GNAT_Array_Split1 is + pragma Preelaborate; + procedure Dummy; +end GNAT_Array_Split1; -- 2.30.2