diff options
author | Joffrey Huguet <huguet@adacore.com> | 2022-08-30 18:00:35 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-12 10:16:51 +0200 |
commit | 4a7312f7ce189783a2cb5318bdcf50e8148b909d (patch) | |
tree | 95c8f1fb18fdebcadc8f19d36e50adb7fbbf2980 /gcc/testsuite/gnat.dg | |
parent | cf8af60f6a3910577e99db04dbc757e731558144 (diff) | |
download | gcc-4a7312f7ce189783a2cb5318bdcf50e8148b909d.zip gcc-4a7312f7ce189783a2cb5318bdcf50e8148b909d.tar.gz gcc-4a7312f7ce189783a2cb5318bdcf50e8148b909d.tar.bz2 |
[Ada] Replace SPARK containers implementation by Compile_Time_Error
The SPARK containers are now maintained under the spark2014 repository.
This change replaces the implementation of SPARK containers by a
pragma Compile_Time_Error, pointing the users WITHing the libraries
to their new location.
gcc/ada/
* Makefile.rtl: Remove SPARK containers filenames.
* impunit.adb: Remove SPARK containers packages names.
* libgnat/a-cfdlli.adb, libgnat/a-cfdlli.ads: Remove content and
add pragma Compile_Time_Error with suitable message.
* libgnat/a-cfhama.adb, libgnat/a-cfhama.ads: Likewise.
* libgnat/a-cfhase.adb, libgnat/a-cfhase.ads: Likewise.
* libgnat/a-cfidll.adb, libgnat/a-cfidll.ads: Likewise.
* libgnat/a-cfinse.adb, libgnat/a-cfinse.ads: Likewise.
* libgnat/a-cfinve.adb, libgnat/a-cfinve.ads: Likewise.
* libgnat/a-cforma.adb, libgnat/a-cforma.ads: Likewise.
* libgnat/a-cforse.adb, libgnat/a-cforse.ads: Likewise.
* libgnat/a-cofove.adb, libgnat/a-cofove.ads: Likewise.
* libgnat/a-cofuma.adb, libgnat/a-cofuma.ads: Likewise.
* libgnat/a-cofuse.adb, libgnat/a-cofuse.ads: Likewise.
* libgnat/a-cofuve.adb, libgnat/a-cofuve.ads: Likewise.
* libgnat/a-cofuba.adb, libgnat/a-cofuba.ads: Remove package.
gcc/testsuite/
* gnat.dg/aspect2.adb: Removed.
* gnat.dg/aspect2.ads: Removed.
* gnat.dg/config_pragma1.adb: Removed.
* gnat.dg/config_pragma1_pkg.ads: Removed.
* gnat.dg/equal8.adb: Removed.
* gnat.dg/equal8.ads: Removed.
* gnat.dg/equal8_pkg.ads: Removed.
* gnat.dg/formal_containers.adb: Removed.
* gnat.dg/iter1.adb: Removed.
* gnat.dg/iter1.ads: Removed.
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/aspect2.adb | 5 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/aspect2.ads | 30 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/config_pragma1.adb | 21 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/config_pragma1_pkg.ads | 21 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/equal8.adb | 6 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/equal8.ads | 36 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/equal8_pkg.ads | 58 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/formal_containers.adb | 23 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/iter1.adb | 20 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/iter1.ads | 8 |
10 files changed, 0 insertions, 228 deletions
diff --git a/gcc/testsuite/gnat.dg/aspect2.adb b/gcc/testsuite/gnat.dg/aspect2.adb deleted file mode 100644 index acf3329..0000000 --- a/gcc/testsuite/gnat.dg/aspect2.adb +++ /dev/null @@ -1,5 +0,0 @@ --- { dg-do compile } - -package body Aspect2 is - procedure Foo is null; -end Aspect2; diff --git a/gcc/testsuite/gnat.dg/aspect2.ads b/gcc/testsuite/gnat.dg/aspect2.ads deleted file mode 100644 index 73d3fe0..0000000 --- a/gcc/testsuite/gnat.dg/aspect2.ads +++ /dev/null @@ -1,30 +0,0 @@ -with Ada.Containers.Functional_Vectors; -with Ada.Containers; use Ada.Containers; - -generic - type Element_Type (<>) is private; - type Element_Model (<>) is private; - with function Model (X : Element_Type) return Element_Model is <>; - with function Copy (X : Element_Type) return Element_Type is <>; -package Aspect2 with SPARK_Mode is - pragma Unevaluated_Use_Of_Old (Allow); - - type Vector is private; - - function Length (V : Vector) return Natural; - - procedure Foo; - -private - type Element_Access is access Element_Type; - type Element_Array is array (Positive range <>) of Element_Access with - Dynamic_Predicate => Element_Array'First = 1; - type Element_Array_Access is access Element_Array; - type Vector is record - Top : Natural := 0; - Content : Element_Array_Access; - end record; - - function Length (V : Vector) return Natural is - (V.Top); -end Aspect2; diff --git a/gcc/testsuite/gnat.dg/config_pragma1.adb b/gcc/testsuite/gnat.dg/config_pragma1.adb deleted file mode 100644 index bae42d2..0000000 --- a/gcc/testsuite/gnat.dg/config_pragma1.adb +++ /dev/null @@ -1,21 +0,0 @@ --- { dg-do run } --- { dg-options "-gnata" } - -with Ada.Strings.Fixed; use Ada.Strings.Fixed; -with Config_Pragma1_Pkg; use Config_Pragma1_Pkg; - -procedure Config_Pragma1 is - Target : String10; - -begin - for I in Positive10 loop - Move - (Source => Positive10'Image(I), - Target => Target); - - FHM.Include - (Container => FHMM, - Key => Target, - New_Item => I); - end loop; -end Config_Pragma1; diff --git a/gcc/testsuite/gnat.dg/config_pragma1_pkg.ads b/gcc/testsuite/gnat.dg/config_pragma1_pkg.ads deleted file mode 100644 index 1715068..0000000 --- a/gcc/testsuite/gnat.dg/config_pragma1_pkg.ads +++ /dev/null @@ -1,21 +0,0 @@ -pragma Assertion_Policy (Ignore); - -with Ada.Containers; use Ada.Containers; -with Ada.Containers.Formal_Hashed_Maps; -with Ada.Strings; use Ada.Strings; -with Ada.Strings.Hash; - -package Config_Pragma1_Pkg is - subtype Positive10 is Positive range 1 .. 1000; - subtype String10 is String (Positive10); - - package FHM is new Formal_Hashed_Maps - (Key_Type => String10, - Element_Type => Positive10, - Hash => Hash, - Equivalent_Keys => "="); - - FHMM : FHM.Map - (Capacity => 1_000_000, - Modulus => FHM.Default_Modulus (Count_Type (1_000_000))); -end Config_Pragma1_Pkg; diff --git a/gcc/testsuite/gnat.dg/equal8.adb b/gcc/testsuite/gnat.dg/equal8.adb deleted file mode 100644 index 9424abc..0000000 --- a/gcc/testsuite/gnat.dg/equal8.adb +++ /dev/null @@ -1,6 +0,0 @@ --- { dg-do compile } --- { dg-options "-gnata" } - -package body Equal8 is - procedure Foo is null; -end Equal8; diff --git a/gcc/testsuite/gnat.dg/equal8.ads b/gcc/testsuite/gnat.dg/equal8.ads deleted file mode 100644 index 9b6694d..0000000 --- a/gcc/testsuite/gnat.dg/equal8.ads +++ /dev/null @@ -1,36 +0,0 @@ -with Ada.Containers.Formal_Hashed_Sets; -with Ada.Strings.Hash; - --- with Dynamic_Strings; use Dynamic_Strings; --- with Bounded_Dynamic_Strings; - -with Equal8_Pkg; - -package Equal8 is - - package Dynamic_Strings is - -- pragma SPARK_Mode (On); - - package Bounded_Dynamic_Strings is new Equal8_Pkg - (Component => Character, - List_Index => Positive, - List => String, - Default_Value => ' '); - type Dynamic_String is new Bounded_Dynamic_Strings.Sequence; - - end Dynamic_Strings; - use Dynamic_Strings; - - subtype Subscription_Address is Dynamic_String (Capacity => 255); - - function Hashed_Subscription_Address (Element : Subscription_Address) - return Ada.Containers.Hash_Type is - (Ada.Strings.Hash (Value (Element))); - - package Subscription_Addresses is new Ada.Containers.Formal_Hashed_Sets - (Element_Type => Subscription_Address, - Hash => Hashed_Subscription_Address, - Equivalent_Elements => "="); - - procedure Foo; -end Equal8; diff --git a/gcc/testsuite/gnat.dg/equal8_pkg.ads b/gcc/testsuite/gnat.dg/equal8_pkg.ads deleted file mode 100644 index b454a2c..0000000 --- a/gcc/testsuite/gnat.dg/equal8_pkg.ads +++ /dev/null @@ -1,58 +0,0 @@ -generic - type Component is private; - type List_Index is range <>; - type List is array (List_Index range <>) of Component; - Default_Value : Component; - -- with function "=" (Left, Right : List) return Boolean is <>; - -package Equal8_Pkg is - - pragma Pure; - - Maximum_Length : constant List_Index := List_Index'Last; - - subtype Natural_Index is List_Index'Base range 0 .. Maximum_Length; - type Sequence (Capacity : Natural_Index) is private; - -- from zero to Capacity. - - function Value (This : Sequence) return List; - -- Returns the content of this sequence. The value returned is the - -- "logical" value in that only that slice which is currently assigned - -- is returned, as opposed to the entire physical representation. - - overriding - function "=" (Left, Right : Sequence) return Boolean with - Inline; - - function "=" (Left : Sequence; Right : List) return Boolean with - Inline; - -private - type Sequence (Capacity : Natural_Index) is record - Current_Length : Natural_Index := 0; - Content : List (1 .. Capacity) := (others => Default_Value); - end record; - - ----------- - -- Value -- - ----------- - - function Value (This : Sequence) return List is - (This.Content (1 .. This.Current_Length)); - - --------- - -- "=" -- - --------- - - overriding - function "=" (Left, Right : Sequence) return Boolean is - (Value (Left) = Value (Right)); - - --------- - -- "=" -- - --------- - - function "=" (Left : Sequence; Right : List) return Boolean is - (Value (Left) = Right); -end Equal8_Pkg; - diff --git a/gcc/testsuite/gnat.dg/formal_containers.adb b/gcc/testsuite/gnat.dg/formal_containers.adb deleted file mode 100644 index 185b946..0000000 --- a/gcc/testsuite/gnat.dg/formal_containers.adb +++ /dev/null @@ -1,23 +0,0 @@ --- { dg-do compile } - -with Ada.Containers.Formal_Hashed_Sets; - -procedure Formal_Containers is - type T is new Integer; - - function Eq (X : T; Y : T) return Boolean; - - function Hash (X : T) return Ada.Containers.Hash_Type is (0); - - package TSet is new Ada.Containers.Formal_Hashed_Sets - (Element_Type => T, - Hash => Hash, - Equivalent_Elements => Eq); - - S : Tset.Set := TSet.Empty_Set; - - function Eq (X : T; Y : T) return Boolean is - begin - return TSet.Contains (S, X) or TSet.Contains (S, Y); - end Eq; -begin null; end Formal_Containers; diff --git a/gcc/testsuite/gnat.dg/iter1.adb b/gcc/testsuite/gnat.dg/iter1.adb deleted file mode 100644 index a0a69cf..0000000 --- a/gcc/testsuite/gnat.dg/iter1.adb +++ /dev/null @@ -1,20 +0,0 @@ --- { dg-do compile } - -with Ada.Text_IO; - -package body Iter1 is - - type Table is array (Integer range <>) of Float; - My_Table : Table := (1.0, 2.0, 3.0); - - procedure Dummy (L : My_Lists.List) is - begin - for Item : Boolean of L loop -- { dg-error "subtype indication does not match element type" } - Ada.Text_IO.Put_Line (Integer'Image (Item)); - end loop; - - for Item : Boolean of My_Table loop -- { dg-error "subtype indication does not match component type" } - null; - end loop; - end; -end Iter1; diff --git a/gcc/testsuite/gnat.dg/iter1.ads b/gcc/testsuite/gnat.dg/iter1.ads deleted file mode 100644 index 8329f75..0000000 --- a/gcc/testsuite/gnat.dg/iter1.ads +++ /dev/null @@ -1,8 +0,0 @@ -with Ada.Containers.Formal_Doubly_Linked_Lists; - -package Iter1 is - package My_Lists is new Ada.Containers.Formal_Doubly_Linked_Lists - (Element_Type => Integer); - - procedure Dummy (L : My_Lists.List); -end Iter1; |