3 procedure Missing_Acc_Check
is
5 Test_Failed
: Exception;
7 type Int_Access
is access all Integer;
9 Save
: Int_Access
:= null;
11 type Int_Rec
is record
12 Int
: aliased Integer;
15 type Ltd_Rec
(IR_Acc
: access Int_Rec
) is limited null record;
17 function Pass_Rec
(IR_Acc
: access Int_Rec
) return Int_Access
is
19 return IR_Acc
.Int
'Access; -- Accessibility check here
24 LR
: Ltd_Rec
(IR
'Access);
26 Save
:= Pass_Rec
(LR
.IR_Acc
); -- Must raise Program_Error;
39 end Missing_Acc_Check
;