1-- { dg-do run } 2-- { dg-options "-gnat12" } 3 4procedure In_Out_Parameter2 is 5 6 function F (I : In Out Integer) return Boolean is 7 A : Integer := I; 8 begin 9 I := I + 1; 10 return (A > 0); 11 end; 12 13 I : Integer := 0; 14 B : Boolean; 15 16begin 17 B := F (I); 18 if B then 19 raise Program_Error; 20 end if; 21 if I /= 1 then 22 raise Program_Error; 23 end if; 24end; 25