1-- { dg-do run }
2
3with Init12; use Init12;
4with Text_IO; use Text_IO;
5with Dump;
6
7procedure P12 is
8
9  Local_A1  : Arr1;
10  Local_A11 : Arr11;
11  Local_A2  : Arr2;
12  Local_A22 : Arr22;
13
14begin
15  Put ("My_A1     :");
16  Dump (My_A1'Address, Arr1'Max_Size_In_Storage_Elements);
17  New_Line;
18  -- { dg-output "My_A1     : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
19
20  Put ("My_A11    :");
21  Dump (My_A11'Address, Arr11'Max_Size_In_Storage_Elements);
22  New_Line;
23  -- { dg-output "My_A11    : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
24
25  Put ("My_A2     :");
26  Dump (My_A2'Address, Arr2'Max_Size_In_Storage_Elements);
27  New_Line;
28  -- { dg-output "My_A2     : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
29
30  Put ("My_A22    :");
31  Dump (My_A22'Address, Arr22'Max_Size_In_Storage_Elements);
32  New_Line;
33  -- { dg-output "My_A22    : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
34
35  Local_A1 := My_A1;
36  Put ("Local_A1  :");
37  Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
38  New_Line;
39  -- { dg-output "Local_A1  : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
40
41  Local_A11 := My_A11;
42  Put ("Local_A11 :");
43  Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
44  New_Line;
45  -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
46
47  Local_A2 := My_A2;
48  Put ("Local_A2  :");
49  Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
50  New_Line;
51  -- { dg-output "Local_A2  : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
52
53  Local_A22 := My_A22;
54  Put ("Local_A22 :");
55  Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
56  New_Line;
57  -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
58
59  Local_A1 := (16#AB0012#, 16#CD0034#, 16#EF0056#);
60  Put ("Local_A1  :");
61  Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
62  New_Line;
63  -- { dg-output "Local_A1  : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
64
65  Local_A11 := (1 => (16#AB0012#, 16#CD0034#),
66                2 => (16#AB0012#, 16#CD0034#));
67  Put ("Local_A11 :");
68  Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
69  New_Line;
70  -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
71
72  Local_A2 := (16#AB0012#, 16#CD0034#, 16#EF0056#);
73  Put ("Local_A2  :");
74  Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
75  New_Line;
76  -- { dg-output "Local_A2  : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
77
78  Local_A22 := (1 => (16#AB0012#, 16#CD0034#),
79                2 => (16#AB0012#, 16#CD0034#));
80  Put ("Local_A22 :");
81  Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
82  New_Line;
83  -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
84
85  Local_A1(1) := Local_A2(1);
86  Local_A1(2) := Local_A2(2);
87  Local_A1(3) := Local_A2(3);
88
89  Put ("Local_A1  :");
90  Dump (Local_A1'Address, Arr1'Max_Size_In_Storage_Elements);
91  New_Line;
92  -- { dg-output "Local_A1  : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
93
94  Local_A11(1,1) := Local_A22(1,1);
95  Local_A11(1,2) := Local_A22(1,2);
96  Local_A11(2,1) := Local_A22(2,1);
97  Local_A11(2,2) := Local_A22(2,2);
98
99  Put ("Local_A11 :");
100  Dump (Local_A11'Address, Arr11'Max_Size_In_Storage_Elements);
101  New_Line;
102  -- { dg-output "Local_A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
103
104  Local_A2(1) := Local_A1(1);
105  Local_A2(2) := Local_A1(2);
106  Local_A2(3) := Local_A1(3);
107
108  Put ("Local_A2  :");
109  Dump (Local_A2'Address, Arr2'Max_Size_In_Storage_Elements);
110  New_Line;
111  -- { dg-output "Local_A2  : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
112
113  Local_A22(1,1) := Local_A11(1,1);
114  Local_A22(1,2) := Local_A11(1,2);
115  Local_A22(2,1) := Local_A11(2,1);
116  Local_A22(2,2) := Local_A11(2,2);
117
118  Put ("Local_A22 :");
119  Dump (Local_A22'Address, Arr22'Max_Size_In_Storage_Elements);
120  New_Line;
121  -- { dg-output "Local_A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
122end;
123