2 -- { dg-options "-O3" }
4 with Ada
.Finalization
; use Ada
.Finalization
;
5 with Opt57_Pkg
; use Opt57_Pkg
;
13 type Module_Factory
is abstract new Limited_Controlled
with private;
15 type Root_Module_Rec
(Language
: access Module_Factory
'Class)
16 is abstract new GC_Pool
with null record;
18 type List
is tagged limited private;
19 type Linkable
is abstract new Root_Module_Rec
with private;
20 type Linkable_Ptr
is access all Linkable
'Class;
24 type Link
is access all List
'Class;
25 type Link_Constant
is access constant List
'Class;
26 type List
is tagged limited record
30 type Links_Type
(Container
: access Linkable
) is new List
with null record;
32 type Linkable
is abstract new Root_Module_Rec
with record
33 On_List
: Link_Constant
;
34 Links
: aliased Links_Type
(Linkable
'Access);
37 type Module_Rec
(Language
: access Module_Factory
'Class)
38 is abstract new Linkable
(Language
) with null record;
39 type Module_Ptr
is access all Module_Rec
'Class;
41 type Private_Module_Factory
;
42 type Private_Module_Factory_Ptr
is access Private_Module_Factory
;
44 type Module_Factory
is abstract new Limited_Controlled
with record
45 Priv
: Private_Module_Factory_Ptr
;
48 type Module_Factory_Ptr
is access all Module_Factory
'Class;