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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [modular3.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
 
3
with Modular3_Pkg; use Modular3_Pkg;
4
 
5
procedure Modular3 is
6
 
7
  function F1 (A : Int16_T) return Int16_T is
8
  begin
9
    return A + 128;
10
  end;
11
 
12
  function F2 (B : Mod16_T) return Mod16_T is
13
  begin
14
    return B + 128;
15
  end;
16
 
17
  A : Int16_T := 16384;
18
  B : Mod16_T := 65504;
19
 
20
begin
21
 
22
  A := F1 (A);
23
  if A /= 16512 then
24
    raise Program_Error;
25
  end if;
26
 
27
  B := F2 (B);
28
  if B /= 96 then
29
    raise Program_Error;
30
  end if;
31
 
32
end Modular3;

powered by: WebSVN 2.1.0

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