--  `'Constrained` of an `out` or `in out` parameter is its actual's (RM 3.7.2(3), ACATS
--  C37405A, D199): the caller passes whether the actual is constrained, a variable of a
--  subtype with defaults and no constraint being the one that is not.
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type Rec (Disc : Integer := 25) is record
      Comp : Integer;
   end record;
   subtype Constr is Rec (10);
   type Holder is record
      Comp : Rec;
   end record;
   C : Constr := (10, 1);
   U : Rec := (10, 2);
   H : Holder := (Comp => (10, 3));

   procedure Show (P : in out Rec) with Pre => P.Comp in 0 .. 99, Post => P.Comp in 1 .. 100 is
   begin
      Put (Boolean'Image (P'Constrained) & " ");
      P.Comp := P.Comp + 1;
      pragma Assert (P.Comp <= 100);
   end Show;
begin
   Show (C);
   Show (U);
   Show (H.Comp);
   Put_Line (Integer'Image (C.Comp + U.Comp + H.Comp.Comp));
end Main;
