Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / ada / acats / tests / c9 / c97303c.ada
bloba6143037c69b88584f5518ca521daaedd97a4145
1 -- C97303C.ADA
3 -- Grant of Unlimited Rights
4 --
5 -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6 -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
7 -- unlimited rights in the software and documentation contained herein.
8 -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
9 -- this public release, the Government intends to confer upon all
10 -- recipients unlimited rights equal to those held by the Government.
11 -- These rights include rights to use, duplicate, release or disclose the
12 -- released technical data and computer software in whole or in part, in
13 -- any manner and for any purpose whatsoever, and to have or permit others
14 -- to do so.
16 -- DISCLAIMER
18 -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19 -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
20 -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21 -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
22 -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23 -- PARTICULAR PURPOSE OF SAID MATERIAL.
24 --*
25 -- CHECK THAT A TIMED ENTRY CALL CAN APPEAR IN PLACES WHERE A SELECTIVE
26 -- WAIT IS NOT ALLOWED.
28 -- PART 3: TASK BODY NESTED WITHIN A TASK.
30 -- WRG 7/15/86
32 with Impdef;
33 WITH REPORT; USE REPORT;
34 PROCEDURE C97303C IS
36 BEGIN
38 TEST ("C97303C", "CHECK THAT A TIMED ENTRY CALL CAN " &
39 "APPEAR IN PLACES WHERE A SELECTIVE WAIT " &
40 "IS NOT ALLOWED; CASE: TASK BODY NESTED " &
41 "WITHIN A TASK");
43 DECLARE
45 TASK T IS
46 ENTRY E;
47 ENTRY SYNCH;
48 END T;
50 TASK BODY T IS
51 BEGIN
52 ACCEPT SYNCH;
53 ACCEPT SYNCH;
54 ACCEPT SYNCH;
55 ACCEPT E;
56 END T;
58 TASK OUTER IS
59 ENTRY E;
60 ENTRY SYNCH;
61 END OUTER;
63 TASK BODY OUTER IS
65 TASK TYPE INNER;
67 INNER1 : INNER;
69 TASK BODY INNER IS
70 BEGIN
71 SELECT
72 T.E;
73 FAILED ("TIMED ENTRY CALL ACCEPTED - " &
74 "INNER (1)");
76 DELAY 1.0 * Impdef.One_Second;
77 T.SYNCH;
78 END SELECT;
80 SELECT
81 OUTER.E;
82 FAILED ("TIMED ENTRY CALL ACCEPTED - " &
83 "INNER (2)");
85 DELAY 1.0 * Impdef.One_Second;
86 OUTER.SYNCH;
87 END SELECT;
88 EXCEPTION
89 WHEN OTHERS =>
90 FAILED ("EXCEPTION RAISED - INNER");
91 END INNER;
93 PACKAGE DUMMY IS
94 TYPE ACC_INNER IS ACCESS INNER;
95 INNER2 : ACC_INNER := NEW INNER;
96 END DUMMY;
98 BEGIN
100 SELECT
101 T.E;
102 FAILED ("TIMED ENTRY CALL ACCEPTED - OUTER");
104 DELAY 1.0 * Impdef.One_Second;
105 T.SYNCH;
106 END SELECT;
108 ACCEPT SYNCH;
109 ACCEPT SYNCH;
110 ACCEPT E;
112 EXCEPTION
114 WHEN OTHERS =>
115 FAILED ("EXCEPTION RAISED - OUTER");
117 END OUTER;
119 BEGIN
121 T.E;
122 OUTER.E;
124 END;
126 RESULT;
128 END C97303C;