OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [in_out_parameter2.adb] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
-- { dg-do run }
2
-- { dg-options "-gnat12" }
3
 
4
procedure 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
 
16
begin
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;
24
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.