--  A cycle of with clauses through a `limited with` (RM 10.1.1): A sees B's limited view,
--  its record type as an incomplete type that an access type may designate; B and Main see
--  A whole, and Main sees B whole; a package nested in B is in its limited view too.
with Ada.Text_IO;
with A;
with B;
procedure Main is
   R : B.B_Rec;
begin
   R.Value := 3;
   R.Back.Count := 3;
   A.Touch (R.Back);
   Ada.Text_IO.Put_Line (Integer'Image (R.Value + R.Back.Count) & Boolean'Image (R.Back.Link = null));
end Main;
