Debian Codegraph @

gcc/testsuite/gnat.dg/opt41_pkg.ads

raw
1 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
2
3 package Opt41_Pkg is
4
5 type Enum is (One, Two, Three, Four, Five, Six);
6
7 type Rec (D : Enum) is record
8 case D is
9 when One =>
10 I : Integer;
11 when Two | Five | Six =>
12 S : Unbounded_String;
13 case D is
14 when Two => B : Boolean;
15 when others => null;
16 end case;
17 when others =>
18 null;
19 end case;
20 end record;
21
22 type Rec_Ptr is access all Rec;
23
24 function Rec_Write (R : Rec) return Unbounded_String;
25
26 function Rec_Read (Str : String_Access) return Rec;
27
28 end Opt41_Pkg;