From: Hristian Kirtchev Date: Mon, 11 Jun 2018 09:18:44 +0000 (+0000) Subject: [Ada] Make GNAT.Array_Split a preelaborable unit X-Git-Tag: upstream/12.2.0~31060 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24d124a42aefdb882f393f6c2211d9c9c3914c70;p=platform%2Fupstream%2Fgcc.git [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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 97dbbf3..85b344e 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 62d4042..efcc2d4 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 e9a5c15..9b5ecca 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 0000000..edac820 --- /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 0000000..9c3ea9f --- /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;