--  A subtype with a static predicate as an aggregate's choice covers its values only (RM
--  3.2.4, 4.3.3(18)), within the index range; and in a delta aggregate a subtype without one
--  covers its range (D257).
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type A is array (1 .. 6) of Integer;
   subtype Even is Integer with Static_Predicate => Even in 2 | 4 | 6;
   subtype Mid is Integer range 3 .. 4;
   X : constant A := (Even => 1, others => 0);
   Y : constant A := (X with delta Mid => 7);
begin
   pragma Assert (X (3) = 0 and X (4) = 1 and Y (3) = 7 and Y (6) = 1);
   for K in A'Range loop
      Put (Integer'Image (X (K)) & Integer'Image (Y (K)));
   end loop;
   New_Line;
end Main;
