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/] [discr6.adb] - Blame information for rev 324

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

Line No. Rev Author Line
1 304 jeremybenn
-- { dg-do compile }
2
-- { dg-options "-gnatdm -gnatws" }
3
 
4
with Discr6_Pkg;
5
 
6
procedure Discr6 is
7
 
8
  type T_Bit is range 0..1;
9
  type T_Entier_16 is range -2**15 .. 2**15-1;
10
 
11
  package My_Q is new Discr6_Pkg(T_Entier_16);
12
 
13
  type T_Valeur is (BIT, Entier_16);
14
 
15
  type R(D : T_Valeur) is record
16
    case D is
17
      when BIT => V_BIT : T_Bit;
18
      when Entier_16 => V_E16 : T_Entier_16;
19
    end case;
20
  end record;
21
  for R use record
22
    V_BIT at 0 range 0..7;
23
    V_E16 at 0 range 0..15;
24
    D     at 8 range 0..7;
25
  end record;
26
  for R'size use 128;
27
 
28
  A : R(Entier_16);
29
  I : Integer;
30
 
31
begin
32
  I := My_Q.X(A.V_E16);
33
end;

powered by: WebSVN 2.1.0

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