2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / task_name.ads
blob2d9d3ab15044ed4fa2f458d6372673347bf0599b
1 with Ada.Finalization;
2 package task_name is
3 type Base_Controller is
4 abstract new Ada.Finalization.Limited_Controlled with null record;
6 type Extended_Controller is
7 abstract new Base_Controller with private;
9 type Task_Object (Controller : access Extended_Controller'Class) is
10 limited private;
11 private
12 type String_Access is access string;
14 type Extended_Controller is
15 abstract new Base_Controller with record
16 Thread : aliased Task_Object (Extended_Controller'Access);
17 Name : String_Access := new string'("the_name_of_the_task");
18 end record;
20 task type Task_Object (Controller : access Extended_Controller'Class) is pragma Task_Name (Controller.Name.all);
21 end Task_Object;
22 end;