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

24 lines
395 B
Ada
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
with Unchecked_Deallocation;
package body Prot2_Pkg2 is
protected type Rec is
private
M : T;
end Rec;
protected body Rec is end;
procedure Create (B : out Id) is
begin
B := new Rec;
end;
procedure Delete (B : in out Id) is
procedure Free is new Unchecked_Deallocation(Object => Rec, Name => Id);
begin
Free (B);
end;
end Prot2_Pkg2;