PR ipa/83051
[official-gcc.git] / gcc / testsuite / gnat.dg / misaligned_nest.adb
blob3b6fd845da4d2e5fa69eb8e8787f9085e75a4ffe
1 -- { dg-do run }
2 -- { dg-options "-gnatp" }
4 procedure Misaligned_Nest is
6 type Int is record
7 V : Integer;
8 end record;
10 type Block is record
11 B : Boolean;
12 I : Int;
13 end record;
14 pragma Pack (Block);
15 for Block'Alignment use 1;
17 type Pair is array (1 .. 2) of Block;
19 P : Pair;
20 begin
21 for K in P'Range loop
22 P(K).I.V := 1;
23 end loop;
24 end;