1-- { dg-do run }
2
3with Init12; use Init12;
4with Text_IO; use Text_IO;
5with Dump;
6
7procedure Q12 is
8
9  A1  : Arr1  := My_A1;
10  A11 : Arr11 := My_A11;
11
12  A2  : Arr2  := My_A2;
13  A22 : Arr22 := My_A22;
14
15begin
16  Put ("A1  :");
17  Dump (A1'Address, Arr1'Max_Size_In_Storage_Elements);
18  New_Line;
19  -- { dg-output "A1  : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
20
21  Put ("A11 :");
22  Dump (A11'Address, Arr11'Max_Size_In_Storage_Elements);
23  New_Line;
24  -- { dg-output "A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
25
26  Put ("A2  :");
27  Dump (A2'Address, Arr2'Max_Size_In_Storage_Elements);
28  New_Line;
29  -- { dg-output "A2  : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
30
31  Put ("A22 :");
32  Dump (A22'Address, Arr22'Max_Size_In_Storage_Elements);
33  New_Line;
34  -- { dg-output "A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
35
36  if A1(1) /= A11(1,1) then
37    raise Program_Error;
38  end if;
39
40  if A2(1) /= A22(1,1) then
41    raise Program_Error;
42  end if;
43end;
44