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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 696 jeremybenn
package Discr20 is
2
 
3
  Size : Integer;
4
 
5
  type Name is new String (1..Size);
6
 
7
  type Rec is record
8
     It : Name;
9
  end record;
10
 
11
  type Danger is (This, That);
12
  type def (X : Danger := This) is record
13
    case X is
14
       when This => It : Rec;
15
       when That => null;
16
       end case;
17
   end record;
18
 
19
   type Switch is (On, Off);
20
   type Wrapper (Disc : Switch := On) is private;
21
   function Get (X : Wrapper) return Def;
22
 
23
private
24
   type Wrapper (Disc : Switch := On) is record
25
      Case Disc is
26
         when On  => It : Def;
27
         when Off => null;
28
      end case;
29
   end record;
30
 
31
end Discr20;

powered by: WebSVN 2.1.0

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