2 -- { dg-options "-gnata" }
4 procedure Nested_Return_Test is
5 function H (X: integer) return access integer is
6 Local : aliased integer := (X+1);
11 return Result : access integer do
12 Result := new integer '(27);
15 result.all := result.all + 10;
22 return Result: Access integer do
23 Result := New Integer'(X*X*X);
30 pragma Assert (H (3).all = 127);
31 pragma Assert (H (5).all = 125);
33 end Nested_Return_Test;