view gcc/testsuite/gnat.dg/misaligned_nest.adb @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children
line wrap: on
line source

-- { dg-do run }
-- { dg-options "-gnatp" }

procedure Misaligned_Nest is

   type Int is record
      V : Integer;
   end record;

   type Block is record
      B : Boolean;
      I : Int;
   end record;
   pragma Pack (Block);
   for Block'Alignment use 1;

   type Pair is array (1 .. 2) of Block;

   P : Pair;
begin
   for K in P'Range loop
      P(K).I.V := 1;
   end loop;
end;