2 -- Testcase by Vorfeed Canal
5 -- { dg-options "-gnato" }
7 with Interfaces
.C
; use Interfaces
.C
;
8 with Interfaces
.C
.Strings
; use Interfaces
.C
.Strings
;
9 with Interfaces
.C
.Pointers
;
11 procedure Pointer_Controlled
is
13 function Create
(Name
: String) return size_t
is
15 type Name_String
is new char_array
(0 .. Name
'Length);
16 type Name_String_Ptr
is access Name_String
;
17 pragma Controlled
(Name_String_Ptr
);
19 Name_Str
: constant Name_String_Ptr
:= new Name_String
;
23 To_C
(Name
, Name_Str
.all, Name_Len
);
30 Test
:= Create
("ABC");