--  An iterated aggregate going to a static subtype: its components slide in from the
--  iterator's bounds, in an object and in a record component's default (which no caller
--  converts to the component's static form).
pragma Extensions_Allowed (On);
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type Vec is array (Integer range <>) of Integer;
   subtype Five is Vec (1 .. 5);
   type R is record
      A : Five := [for I in 1 .. 5 => I * 10];
      B : Integer := 0;
   end record;
   X : R;
   V : constant Vec (5 .. 7) := [for I in 1 .. 3 => I];
begin
   pragma Assert (X.A (3) = 30);
   pragma Assert (V (5) = 1 and V (7) = 3);
   Put_Line (Integer'Image (X.A (3)) & Integer'Image (V (5)) & Integer'Image (V (7)));
end Main;
