--  A `Component_Size` larger than the components' natural storage pads each component to
--  it, and an `Alignment` places objects (D196): indexing, aggregates, equality, string
--  literals, `'Size` and `Unchecked_Conversion` all see the padded stride.
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Unchecked_Conversion;
with Interfaces; use Interfaces;
procedure Main is
   type Wide is array (1 .. 4) of Unsigned_8;
   for Wide'Component_Size use 32;
   type Words is array (1 .. 4) of Unsigned_32;
   function To_Words is new Ada.Unchecked_Conversion (Wide, Words);
   function To_Wide is new Ada.Unchecked_Conversion (Words, Wide);
   type Text is array (Positive range <>) of Character with Component_Size => 16;
   type Pair is record
      L, R : Integer;
   end record with Alignment => 16;
   Fixed : constant Wide := (1, 2, 3, 4);
   W : Wide := (10, 20, 30, 40);
   T : Text := "abc";
   P : constant Pair := (5, 6);
   X : constant Integer := 7;
   for X'Alignment use 8;
begin
   Put_Line (Integer'Image (Wide'Component_Size) & Integer'Image (Wide'Size) & Integer'Image (Text'Component_Size));
   W (3) := W (2) + Fixed (4);
   for E of W loop
      Put (Unsigned_8'Image (E));
   end loop;
   New_Line;
   for E of To_Words (W) loop
      Put (Unsigned_32'Image (E));
   end loop;
   New_Line;
   Put_Line (Boolean'Image (To_Wide ((10, 20, 24, 40)) = W) & Boolean'Image (W = Fixed));
   T (2) := 'x';
   for C of T loop
      Put (C);
   end loop;
   Put_Line (Integer'Image (T'Length) & Boolean'Image (T = "axc"));
   for C of Text'(T & 'd' & T (1 .. 2)) loop
      Put (C);
   end loop;
   New_Line;
   Put_Line (Integer'Image (Pair'Alignment) & Integer'Image (P'Alignment) & Integer'Image (X'Alignment) & Integer'Image (P.L + P.R + X));
end Main;
