procedure Check_Unions is

subtype Cases_2 is Integer range 0 .. 2;

type Complex_Record (Kind : Cases_2 := 0) is record
   Constant_Part : Character;
   Constant_Part2 : Character;
   case Kind is
   when 0 =>
     Variant_Part1 : Character;
   when 1 =>
     Variant_Part2 : Character;
   when 2 =>
     Variant_Part3 : Character;
   end case;
end record;

pragma Unchecked_Union (Complex_Record);

Complex_Value1 : Complex_Record :=
  (Constant_Part => 'y',
   Constant_Part2 => 'h',
   Variant_Part1 => 'x');

begin
   null;
end Check_Unions;
