Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gnat.dg / addr14.adb
blobe92c902f038791ec915561308020718314af5928
1 -- { dg-do run }
3 with System;
5 procedure Addr14 is
7 type Arr is array (1 .. 4) of aliased Integer;
9 A : Arr := (1, 2, 3, 4);
10 I : Natural := 0;
12 function Get_Address return System.Address is
13 begin
14 I := I + 1;
15 return A(I)'Address;
16 end;
18 Foo : Integer with Address => Get_Address;
20 begin
21 if Foo /= 1 then
22 raise Program_Error;
23 end if;
24 end;