| 1 |
-- { dg-do run } |
| 2 |
-- { dg-options "-gnat12 -gnatVa" } |
| 3 |
|
| 4 |
procedure In_Out_Parameter4 is |
| 5 |
|
| 6 |
type Enum is (E_Undetermined, E_Down, E_Up); |
| 7 |
subtype Status_T is Enum range E_Down .. E_Up; |
| 8 |
|
| 9 |
function Recurse (Val : in out Integer) return Status_T is |
| 10 |
|
| 11 |
Result : Status_T; |
| 12 |
|
| 13 |
procedure Dummy (I : in out Integer) is begin null; end; |
| 14 |
|
| 15 |
begin |
| 16 |
if Val > 500 then |
| 17 |
Val := Val - 1; |
| 18 |
Result := Recurse (Val); |
| 19 |
return Result; |
| 20 |
else |
| 21 |
return E_UP; |
| 22 |
end if; |
| 23 |
end; |
| 24 |
|
| 25 |
Val : Integer := 501; |
| 26 |
S : Status_T; |
| 27 |
|
| 28 |
begin |
| 29 |
S := Recurse (Val); |
| 30 |
end; |