summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/elab1.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs/elab1.ads')
-rw-r--r--gcc/testsuite/gnat.dg/specs/elab1.ads21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/elab1.ads b/gcc/testsuite/gnat.dg/specs/elab1.ads
new file mode 100644
index 000000000..ac435d76a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/elab1.ads
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+
+pragma Restrictions(No_Elaboration_Code);
+
+with System;
+
+package Elab1 is
+
+ type Ptrs_Type is array (Integer range 1 .. 2) of System.Address;
+ type Vars_Array is array (Integer range 1 .. 2) of Integer;
+
+ Vars : Vars_Array;
+
+ Val1 : constant Integer := 1;
+ Val2 : constant Integer := 2;
+
+ Ptrs : constant Ptrs_Type :=
+ (1 => Vars (Val1)'Address,
+ 2 => Vars (Val2)'Address);
+
+end Elab1;