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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [discr16.adb] - Blame information for rev 304

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
 
3
with Discr16_G;
4
with Discr16_Cont; use Discr16_Cont;
5
 
6
procedure Discr16 is
7
 
8
  generic
9
    type T is (<>);
10
  function MAX_ADD_G(X : T; I : INTEGER) return T;
11
 
12
  function MAX_ADD_G(X : T; I : INTEGER) return T is
13
  begin
14
    return T'val(T'pos(X) + LONG_INTEGER(I));
15
  end;
16
 
17
  function MAX_ADD is new MAX_ADD_G(ES6A);
18
 
19
  package P is new Discr16_G(ES6A, MAX_ADD);
20
 
21
begin
22
  null;
23
end;

powered by: WebSVN 2.1.0

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