1-- { dg-do run }
2
3with Init5; use Init5;
4with Text_IO; use Text_IO;
5with Dump;
6
7procedure T5 is
8
9  Local_R1 : R1;
10  Local_R2 : R2;
11
12begin
13  Local_R1.I    := My_R1.I + 1;
14  Local_R1.A(1) := My_R1.A(1) + 1;
15  Local_R1.A(2) := My_R1.A(2) + 1;
16  Local_R1.A(3) := My_R1.A(3) + 1;
17
18  Put ("Local_R1 :");
19  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
20  New_Line;
21  -- { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" }
22
23  Local_R2.I    := My_R2.I + 1;
24  Local_R2.A(1) := My_R2.A(1) + 1;
25  Local_R2.A(2) := My_R2.A(2) + 1;
26  Local_R2.A(3) := My_R2.A(3) + 1;
27
28  Put ("Local_R2 :");
29  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
30  New_Line;
31  -- { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" }
32
33  Local_R1 := (I => 16#12345678#,
34               A => (16#AB0012#, 16#CD0034#, 16#EF0056#));
35  Put ("Local_R1 :");
36  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
37  New_Line;
38  -- { dg-output "Local_R1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
39
40  Local_R2 := (I => 16#12345678#,
41               A => (16#AB0012#, 16#CD0034#, 16#EF0056#));
42  Put ("Local_R2 :");
43  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
44  New_Line;
45  -- { dg-output "Local_R2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
46
47  Local_R1.I    := Local_R1.I + 1;
48  Local_R1.A(1) := Local_R1.A(1) + 1;
49  Local_R1.A(2) := Local_R1.A(2) + 1;
50  Local_R1.A(3) := Local_R1.A(3) + 1;
51
52  Put ("Local_R1 :");
53  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
54  New_Line;
55  -- { dg-output "Local_R1 : 79 56 34 12 13 00 ab 00 35 00 cd 00 57 00 ef 00.*\n" }
56
57  Local_R2.I    := Local_R2.I + 1;
58  Local_R2.A(1) := Local_R2.A(1) + 1;
59  Local_R2.A(2) := Local_R2.A(2) + 1;
60  Local_R2.A(3) := Local_R2.A(3) + 1;
61
62  Put ("Local_R2 :");
63  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
64  New_Line;
65  -- { dg-output "Local_R2 : 12 34 56 79 00 ab 00 13 00 cd 00 35 00 ef 00 57.*\n" }
66
67end;
68