3 with Init12
; use Init12
;
4 with Text_IO
; use Text_IO
;
9 function Get_Elem
(A
: Arr1
) return Integer is
15 procedure Set_Elem
(A
: access Arr1
; I
: Integer) is
22 function Get_Elem
(A
: Arr11
) return Integer is
28 procedure Set_Elem
(A
: access Arr11
; I
: Integer) is
35 function Get_Elem
(A
: Arr2
) return Integer is
41 procedure Set_Elem
(A
: access Arr2
; I
: Integer) is
48 function Get_Elem
(A
: Arr22
) return Integer is
54 procedure Set_Elem
(A
: access Arr22
; I
: Integer) is
61 A1
: aliased Arr1
:= My_A1
;
62 A11
: aliased Arr11
:= My_A11
;
64 A2
: aliased Arr2
:= My_A2
;
65 A22
: aliased Arr22
:= My_A22
;
69 Dump
(A1
'Address, Arr1
'Max_Size_In_Storage_Elements);
71 -- { dg-output "A1 : 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
74 Dump
(A11
'Address, Arr11
'Max_Size_In_Storage_Elements);
76 -- { dg-output "A11 : 12 00 ab 00 34 00 cd 00 12 00 ab 00 34 00 cd 00.*\n" }
79 Dump
(A2
'Address, Arr2
'Max_Size_In_Storage_Elements);
81 -- { dg-output "A2 : 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
84 Dump
(A22
'Address, Arr22
'Max_Size_In_Storage_Elements);
86 -- { dg-output "A22 : 00 ab 00 12 00 cd 00 34 00 ab 00 12 00 cd 00 34.*\n" }
88 if Get_Elem
(A1
) /= 16#AB0012#
then
92 Set_Elem
(A1
'Access, 16#CD0034#
);
93 if Get_Elem
(A1
) /= 16#CD0034#
then
97 if Get_Elem
(A11
) /= 16#AB0012#
then
101 Set_Elem
(A11
'Access, 16#CD0034#
);
102 if Get_Elem
(A11
) /= 16#CD0034#
then
106 if Get_Elem
(A2
) /= 16#AB0012#
then
110 Set_Elem
(A2
'Access, 16#CD0034#
);
111 if Get_Elem
(A2
) /= 16#CD0034#
then
115 if Get_Elem
(A22
) /= 16#AB0012#
then
119 Set_Elem
(A22
'Access, 16#CD0034#
);
120 if Get_Elem
(A22
) /= 16#CD0034#
then