1-- { dg-do run }
2
3with Init11; use Init11;
4with Text_IO; use Text_IO;
5with Dump;
6
7procedure U11 is
8
9  Local_R1 : R1;
10  Local_R2 : R2;
11  C1 : My_Integer;
12  C2 : My_Integer;
13
14begin
15  Local_R1 := (I => 1, A => (16#AB0012#, 16#CD0034#, 16#EF0056#));
16  Put ("Local_R1 :");
17  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
18  New_Line;
19  -- { dg-output "Local_R1 : 01 00 00 00 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
20
21  Local_R2 := (I => 1, A => (16#AB0012#, 16#CD0034#, 16#EF0056#));
22  Put ("Local_R2 :");
23  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
24  New_Line;
25  -- { dg-output "Local_R2 : 00 00 00 01 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
26
27  C1 := Local_R1.A (Integer(Local_R1.I));
28  Put_Line ("C1 :" & C1'Img);
29  -- { dg-output "C1 : 11206674.*\n" }
30
31  Local_R1.I := Local_R1.I + 1;
32  C1 := Local_R1.A (Integer(Local_R1.I));
33  Put_Line ("C1 :" & C1'Img);
34  -- { dg-output "C1 : 13434932.*\n" }
35
36  C2 := Local_R2.A (Integer(Local_R2.I));
37  Put_Line ("C2 :" & C2'Img);
38  -- { dg-output "C2 : 11206674.*\n" }
39
40  Local_R2.I := Local_R2.I + 1;
41  C2 := Local_R2.A (Integer(Local_R2.I));
42  Put_Line ("C2 :" & C2'Img);
43  -- { dg-output "C2 : 13434932.*\n" }
44end;
45