2016-01-15 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / discr_test.adb
blob1a6a4d21d8db06369c8a2b0d418bdee0024df712
1 -- { dg-do compile }
3 procedure Discr_Test is
4 procedure P is begin null; end P;
6 task type Tsk1 is
7 entry rvT;
8 end Tsk1;
10 task body Tsk1 is
11 begin
12 accept rvT;
13 end Tsk1;
15 task type Tsk2 (pS : not null access procedure) is
16 entry rvT;
17 end Tsk2;
19 task body Tsk2 is
20 tskT : Tsk1;
21 begin
22 accept rvT do
23 requeue tskT.rvT;
24 end rvT;
25 pS.all;
26 end;
28 Obj : Tsk2 (P'access);
29 begin
30 Obj.rvT;
31 end;