ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gnat.dg/allocator.adb

12 lines
370 B
Ada
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
-- { dg-do compile }
procedure Allocator is
type Object_Type is not null access all Integer;
type Object_Array is array (Positive range <>) of Object_Type;
type Object_Array_Ptr is access Object_Array;
type Data_Ptr is access Object_Array_Ptr;
Copy : Data_Ptr := new Object_Array_Ptr;
begin
Copy.all := new Object_Array (1..2);
end;