1-- { dg-do run }
2
3with Init3; use Init3;
4with Text_IO; use Text_IO;
5with Dump;
6
7procedure P3 is
8
9  Local_R1 : R1;
10  Local_R2 : R2;
11
12begin
13  Put ("My_R1    :");
14  Dump (My_R1'Address, R1'Max_Size_In_Storage_Elements);
15  New_Line;
16  -- { dg-output "My_R1    : e2 59 d1 48 b4 aa d9 bb.*\n" }
17
18  Put ("My_R2    :");
19  Dump (My_R2'Address, R2'Max_Size_In_Storage_Elements);
20  New_Line;
21  -- { dg-output "My_R2    : 84 8d 15 9e 15 5b 35 df.*\n" }
22
23  Local_R1 := My_R1;
24  Put ("Local_R1 :");
25  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
26  New_Line;
27  -- { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" }
28
29  Local_R2 := My_R2;
30  Put ("Local_R2 :");
31  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
32  New_Line;
33  -- { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" }
34
35  Local_R1 := (S1 => 2,
36               I  => 16#12345678#,
37               S2 => 1,
38               N  => (16#AB#, 16#CD#, 16#EF#),
39               B  => True);
40  Put ("Local_R1 :");
41  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
42  New_Line;
43  -- { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" }
44
45  Local_R2 := (S1 => 2,
46               I  => 16#12345678#,
47               S2 => 1,
48               N  => (16#AB#, 16#CD#, 16#EF#),
49               B  => True);
50  Put ("Local_R2 :");
51  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
52  New_Line;
53  -- { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" }
54
55  Local_R1.S1   := Local_R2.S1;
56  Local_R1.I    := Local_R2.I;
57  Local_R1.S2   := Local_R2.S2;
58  Local_R1.N.C1 := Local_R2.N.C1;
59  Local_R1.N.C2 := Local_R2.N.C2;
60  Local_R1.N.C3 := Local_R2.N.C3;
61  Local_R1.B    := Local_R2.B;
62
63  Put ("Local_R1 :");
64  Dump (Local_R1'Address, R1'Max_Size_In_Storage_Elements);
65  New_Line;
66  -- { dg-output "Local_R1 : e2 59 d1 48 b4 aa d9 bb.*\n" }
67
68  Local_R2.S1   := Local_R1.S1;
69  Local_R2.I    := Local_R1.I;
70  Local_R2.S2   := Local_R1.S2;
71  Local_R2.N.C1 := Local_R1.N.C1;
72  Local_R2.N.C2 := Local_R1.N.C2;
73  Local_R2.N.C3 := Local_R1.N.C3;
74  Local_R2.B    := Local_R1.B;
75
76  Put ("Local_R2 :");
77  Dump (Local_R2'Address, R2'Max_Size_In_Storage_Elements);
78  New_Line;
79  -- { dg-output "Local_R2 : 84 8d 15 9e 15 5b 35 df.*\n" }
80end;
81