--  Named components with `others` within bounds known only at run time (D104)
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type Vec is array (Positive range <>) of Integer;
   procedure Show (V : Vec) is
   begin
      for X of V loop
         Put (Integer'Image (X));
      end loop;
      New_Line;
   end Show;
   procedure Test (N : Positive) with Pre => N in 3 .. 100 is
      A : constant Vec (1 .. N) := [for I in 1 .. N => I * I];
      B : constant Vec (1 .. N) := [1 => 7, 3 => 9, others => 0];
      C : Vec (2 .. N + 1) := (others => -1);
   begin
      Show (A);
      Show (B);
      C := (2 => 5, 4 => 8, others => 1);
      Show (C);
   end Test;
begin
   Test (5);
end Main;
