aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/access2.adb
blob: fd91dbea96ee4b3e03957c967ae6e7bb267206f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- { dg-do compile }

procedure access2 is
  Arr : array (1..10) of aliased Float;
  type Acc is access all Float;
  procedure Set (X : integer) is
     Buffer: String (1..8);
     for Buffer'address use Arr (4)'address;
  begin
     Arr (X) := 31.1415;
  end;
  function Get (C : Integer) return Acc is
  begin
     return Arr (C)'access;
  end;
begin
   null;
end;