PR target/84336
[official-gcc.git] / gcc / testsuite / gnat.dg / sso / s7.adb
blob398a12bd9b4ed35c1e6debabd6a50a0cadd65604
1 -- { dg-do run }
3 with Init7; use Init7;
4 with Text_IO; use Text_IO;
5 with Dump;
7 procedure S7 is
9 A1 : R1 := My_R1;
10 A2 : R2 := My_R2;
12 N1 : Nested1;
13 N2 : Nested2;
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 N1 := A1.N;
32 C1 := N1.C1;
33 C2 := N1.C2;
34 C3 := N1.C3;
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 N1.C1 := C1;
46 N1.C2 := C2;
47 N1.C3 := C3;
48 A1.N := N1;
50 N2 := A2.N;
51 C1 := N2.C1;
52 C2 := N2.C2;
53 C3 := N2.C3;
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 N2.C1 := C1;
65 N2.C2 := C2;
66 N2.C3 := C3;
67 A2.N := N2;
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" }
79 end;