--  A record component whose bounds are known only when its type is elaborated (ACATS
--  C37102B's `K : Arr (G.D .. F (5))`): held apart from the record (D191), with the bounds
--  its declaration's elaboration gave, whatever changes later.
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   function F (D : Integer) return Integer is (D);
   N : Integer := 5;
   type Arr is array (Integer range <>) of Integer;
   type Q (D : Integer := 0) is record
      K : Arr (2 .. F (N));
      L : Arr (1 .. N + D);
   end record;
   R : Q;
   S : Q (3);
begin
   N := 7;
   R.K := (others => 4);
   S.L (8) := 9;
   S.K := R.K;
   Put_Line (Integer'Image (R.K'First) & Integer'Image (R.K'Last) & Integer'Image (S.K (5)) & Integer'Image (S.L'Last) & Integer'Image (S.L (8)));
   declare
      T : Q (1);
   begin
      Put_Line (Integer'Image (T.K'Last) & Integer'Image (T.L'Last));
   end;
end Main;
