--  A record whose components have bounds known only at run time, one by its index constraint,
--  one by a constrained array type whose index subtype's are (C37002A): an object declared
--  without a value has both, each component given its bounds (the second had none, and its
--  copy exhausted the secondary stack).
with Ada.Text_IO;
procedure Main is
   function Ident (X : Integer) return Integer is (X);
   X : constant Integer := Ident (5);
   subtype S is Integer range 1 .. X;
   type AR1 is array (S) of Integer;
   type R is record
      A : String (1 .. X);
      C : AR1;
   end record;
   RR : R;
   Copy : R;
begin
   RR.A := (others => 'x');
   RR.C := (others => 7);
   Copy := RR;
   Ada.Text_IO.Put_Line (Integer'Image (RR.A'Last) & Integer'Image (RR.C'Last) & " " & Copy.A & Integer'Image (Copy.C (X)));
end Main;
