summaryrefslogtreecommitdiffstats
path: root/test/FrontendAda/Support
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendAda/Support')
-rw-r--r--test/FrontendAda/Support/element_copy.ads8
-rw-r--r--test/FrontendAda/Support/fat_fields.ads6
-rw-r--r--test/FrontendAda/Support/global_constant.ads4
-rw-r--r--test/FrontendAda/Support/non_lvalue.ads11
-rw-r--r--test/FrontendAda/Support/unc_constructor.ads8
-rw-r--r--test/FrontendAda/Support/var_offset.ads9
-rw-r--r--test/FrontendAda/Support/var_size.ads7
7 files changed, 53 insertions, 0 deletions
diff --git a/test/FrontendAda/Support/element_copy.ads b/test/FrontendAda/Support/element_copy.ads
new file mode 100644
index 0000000..52c6e49
--- /dev/null
+++ b/test/FrontendAda/Support/element_copy.ads
@@ -0,0 +1,8 @@
+package Element_Copy is
+ type SmallInt is range 1 .. 4;
+ type SmallStr is array (SmallInt range <>) of Character;
+ type VariableSizedField (D : SmallInt := 2) is record
+ S : SmallStr (1 .. D) := "Hi";
+ end record;
+ function F return VariableSizedField;
+end;
diff --git a/test/FrontendAda/Support/fat_fields.ads b/test/FrontendAda/Support/fat_fields.ads
new file mode 100644
index 0000000..d3eab3e
--- /dev/null
+++ b/test/FrontendAda/Support/fat_fields.ads
@@ -0,0 +1,6 @@
+package Fat_Fields is
+ pragma Elaborate_Body;
+ type A is array (Positive range <>) of Boolean;
+ type A_Ptr is access A;
+ P : A_Ptr := null;
+end;
diff --git a/test/FrontendAda/Support/global_constant.ads b/test/FrontendAda/Support/global_constant.ads
new file mode 100644
index 0000000..cef4b11
--- /dev/null
+++ b/test/FrontendAda/Support/global_constant.ads
@@ -0,0 +1,4 @@
+package Global_Constant is
+ pragma Elaborate_Body;
+ An_Error : exception;
+end;
diff --git a/test/FrontendAda/Support/non_lvalue.ads b/test/FrontendAda/Support/non_lvalue.ads
new file mode 100644
index 0000000..7d4eeed
--- /dev/null
+++ b/test/FrontendAda/Support/non_lvalue.ads
@@ -0,0 +1,11 @@
+package Non_LValue is
+ type T (Length : Natural) is record
+ A : String (1 .. Length);
+ B : String (1 .. Length);
+ end record;
+ type T_Ptr is access all T;
+ type U is record
+ X : T_Ptr;
+ end record;
+ function A (Y : U) return String;
+end;
diff --git a/test/FrontendAda/Support/unc_constructor.ads b/test/FrontendAda/Support/unc_constructor.ads
new file mode 100644
index 0000000..d6f8db5
--- /dev/null
+++ b/test/FrontendAda/Support/unc_constructor.ads
@@ -0,0 +1,8 @@
+package Unc_Constructor is
+ type C is null record;
+ type A is array (Positive range <>) of C;
+ A0 : constant A;
+ procedure P (X : A);
+private
+ A0 : aliased constant A := (1 .. 0 => (null record));
+end;
diff --git a/test/FrontendAda/Support/var_offset.ads b/test/FrontendAda/Support/var_offset.ads
new file mode 100644
index 0000000..55d0eb2
--- /dev/null
+++ b/test/FrontendAda/Support/var_offset.ads
@@ -0,0 +1,9 @@
+package Var_Offset is
+ pragma Elaborate_Body;
+ type T (L : Natural) is record
+ Var_Len : String (1 .. L);
+ Space : Integer;
+ Small : Character;
+ Bad_Field : Character;
+ end record;
+end;
diff --git a/test/FrontendAda/Support/var_size.ads b/test/FrontendAda/Support/var_size.ads
new file mode 100644
index 0000000..6a570cb
--- /dev/null
+++ b/test/FrontendAda/Support/var_size.ads
@@ -0,0 +1,7 @@
+package Var_Size is
+ type T (Length : Natural) is record
+ A : String (1 .. Length);
+ B : String (1 .. Length);
+ end record;
+ function A (X : T) return String;
+end;