2016-11-21 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / addr9_4.adb
blob526d2a01514463532c68fd253afbbcde138e970d
1 -- { dg-do compile }
3 with Ada.Streams; use Ada.Streams;
5 procedure Addr9_4 is
7 type Signal_Type is mod 2 ** 16;
9 type A_Item is record
10 I : Signal_Type;
11 Q : Signal_Type;
12 end record
13 with Size => 32;
15 for A_Item use record
16 I at 0 range 0 .. 15;
17 Q at 2 range 0 .. 15;
18 end record;
20 type A_Array_Type is
21 array (Positive range <>)
22 of A_Item
23 with Alignment => 16;
25 pragma Pack (A_Array_Type);
27 type B_Array_Type is new Ada.Streams.Stream_Element_Array
28 with Alignment => 16;
30 Ct_Count : constant := 7_000;
32 package Set is
33 A : A_Array_Type := (1 .. Ct_Count => <>);
34 B : B_Array_Type := (1 .. Ct_Count * A_Item'Size / 8 => <>);
35 for B'Address use A'Address;
36 end Set;
38 begin
39 null;
40 end;