2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / access2.adb
blobfd91dbea96ee4b3e03957c967ae6e7bb267206f4
1 -- { dg-do compile }
3 procedure access2 is
4 Arr : array (1..10) of aliased Float;
5 type Acc is access all Float;
6 procedure Set (X : integer) is
7 Buffer: String (1..8);
8 for Buffer'address use Arr (4)'address;
9 begin
10 Arr (X) := 31.1415;
11 end;
12 function Get (C : Integer) return Acc is
13 begin
14 return Arr (C)'access;
15 end;
16 begin
17 null;
18 end;