1-- { dg-do run } 2 3with Init6; use Init6; 4with Text_IO; use Text_IO; 5with Dump; 6 7procedure S6 is 8 9 A1 : R1 := My_R1; 10 A2 : R2 := My_R2; 11 12 AA1 : Arr1; 13 AA2 : Arr2; 14 15 C1 : Integer; 16 C2 : Integer; 17 C3 : Integer; 18 19begin 20 21 Put ("A1 :"); 22 Dump (A1'Address, R1'Max_Size_In_Storage_Elements); 23 New_Line; 24 -- { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } 25 26 Put ("A2 :"); 27 Dump (A2'Address, R1'Max_Size_In_Storage_Elements); 28 New_Line; 29 -- { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } 30 31 AA1 := A1.A; 32 C1 := AA1(1); 33 C2 := AA1(2); 34 C3 := AA1(3); 35 36 Put_Line("C1 :" & C1'Img); 37 -- { dg-output "C1 : 11206674.*\n" } 38 39 Put_Line("C2 :" & C2'Img); 40 -- { dg-output "C2 : 13434932.*\n" } 41 42 Put_Line("C3 :" & C3'Img); 43 -- { dg-output "C3 : 15663190.*\n" } 44 45 AA1(1) := C1; 46 AA1(2) := C2; 47 AA1(3) := C3; 48 A1.A := AA1; 49 50 AA2 := A2.A; 51 C1 := AA2(1); 52 C2 := AA2(2); 53 C3 := AA2(3); 54 55 Put_Line("C1 :" & C1'Img); 56 -- { dg-output "C1 : 11206674.*\n" } 57 58 Put_Line("C2 :" & C2'Img); 59 -- { dg-output "C2 : 13434932.*\n" } 60 61 Put_Line("C3 :" & C3'Img); 62 -- { dg-output "C3 : 15663190.*\n" } 63 64 AA2(1) := C1; 65 AA2(2) := C2; 66 AA2(3) := C3; 67 A2.A := AA2; 68 69 Put ("A1 :"); 70 Dump (A1'Address, R1'Max_Size_In_Storage_Elements); 71 New_Line; 72 -- { dg-output "A1 : 78 56 34 12 00 ab 00 12 00 cd 00 34 00 ef 00 56.*\n" } 73 74 Put ("A2 :"); 75 Dump (A2'Address, R1'Max_Size_In_Storage_Elements); 76 New_Line; 77 -- { dg-output "A2 : 12 34 56 78 12 00 ab 00 34 00 cd 00 56 00 ef 00.*\n" } 78 79end; 80