aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/specs/elab1.ads
blob: ac435d76a269b466996b5fd643d3e91a7aee708c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;