gdb_test "ptype string_access" "= access array \\(<>\\) of character"
+gdb_test "print pa_ptr.all" \
+ " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)"
+
+gdb_test "print pa_ptr(3)" " = 30"
+
+gdb_test "print pa_ptr.all(3)" " = 30"
type Little_Array_Ptr is access all Little_Array;
Arr_Ptr: Little_Array_Ptr :=
new Little_Array'(21, 22, 23, 24, 25, 26, 27, 28, 29, 30);
+
+ -- Same as above, but with a packed array.
+ type Small is range -64 .. 63;
+ for Small'Size use 7;
+ type Packed_Array is array (1..10) of Small;
+ pragma Pack (Packed_Array);
+
+ type Packed_Array_Ptr is access Packed_Array;
+ PA_Ptr : Packed_Array_Ptr
+ := new Packed_Array'(10, 20, 30, 40, 50, 60, 62, 63, -23, 42);
begin
Do_Nothing (String_P'Address); -- STOP
Do_Nothing (Null_String'Address);
Do_Nothing (Arr_Ptr'Address);
+ Do_Nothing (PA_Ptr'Address);
end Foo;