PR testsuite/86649
[official-gcc.git] / gcc / testsuite / gnat.dg / sso / s5.adb
blobb17b4db9b4132ca58b70766dda65e6c4f2b4ea7d
1 -- { dg-do run }
3 with Init5; use Init5;
4 with Text_IO; use Text_IO;
5 with Dump;
7 procedure S5 is
9 A1 : R1 := My_R1;
10 A2 : R2 := My_R2;
12 AA1 : Arr1;
13 AA2 : Arr2;
15 C1 : Integer;
16 C2 : Integer;
17 C3 : Integer;
19 begin
21 Put ("A1 :");
22 Dump (A1'Address, R1'Max_Size_In_Storage_Elements);
23 New_Line;
24 -- { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
26 Put ("A2 :");
27 Dump (A2'Address, R1'Max_Size_In_Storage_Elements);
28 New_Line;
29 -- { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
31 AA1 := A1.A;
32 C1 := AA1(1);
33 C2 := AA1(2);
34 C3 := AA1(3);
36 Put_Line("C1 :" & C1'Img);
37 -- { dg-output "C1 : 11206674.*\n" }
39 Put_Line("C2 :" & C2'Img);
40 -- { dg-output "C2 : 13434932.*\n" }
42 Put_Line("C3 :" & C3'Img);
43 -- { dg-output "C3 : 15663190.*\n" }
45 AA1(1) := C1;
46 AA1(2) := C2;
47 AA1(3) := C3;
48 A1.A := AA1;
50 AA2 := A2.A;
51 C1 := AA2(1);
52 C2 := AA2(2);
53 C3 := AA2(3);
55 Put_Line("C1 :" & C1'Img);
56 -- { dg-output "C1 : 11206674.*\n" }
58 Put_Line("C2 :" & C2'Img);
59 -- { dg-output "C2 : 13434932.*\n" }
61 Put_Line("C3 :" & C3'Img);
62 -- { dg-output "C3 : 15663190.*\n" }
64 AA2(1) := C1;
65 AA2(2) := C2;
66 AA2(3) := C3;
67 A2.A := AA2;
69 Put ("A1 :");
70 Dump (A1'Address, R1'Max_Size_In_Storage_Elements);
71 New_Line;
72 -- { dg-output "A1 : 78 56 34 12 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" }
74 Put ("A2 :");
75 Dump (A2'Address, R1'Max_Size_In_Storage_Elements);
76 New_Line;
77 -- { dg-output "A2 : 12 34 56 78 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" }
78 end;