2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / specs / controlled1.ads
blob1ceedaf37799f95e1668cbbdfa47f576996c483a
1 -- { dg-do compile }
3 with Ada.Finalization;
4 with Controlled1_Pkg; use Controlled1_Pkg;
6 package Controlled1 is
8 type Collection is new Ada.Finalization.Controlled with null record;
10 type Object_Kind_Type is (One, Two);
12 type Byte_Array is array (Natural range <>) of Integer;
14 type Bounded_Byte_Array_Type is record
15 A : Byte_Array (1 .. Value);
16 end record;
18 type Object_Type is tagged record
19 A : Bounded_Byte_Array_Type;
20 end record;
22 type R_Object_Type is new Object_Type with record
23 L : Collection;
24 end record;
26 type Obj_Type (Kind : Object_Kind_Type := One) is record
27 case Kind is
28 when One => R : R_Object_Type;
29 when others => null;
30 end case;
31 end record;
33 type Obj_Array_Type is array (Positive range <>) of Obj_Type;
35 end Controlled1;