Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / ada / acats / tests / c9 / c94002d.ada
blob372fac0bfe44015893972d502c5d7ac3649772ac
1 -- C94002D.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 TASK DOES N O T DEPEND ON A UNIT IF IT IS DESIGNATED
26 -- BY A LOCAL ACCESS VARIABLE (OF THIS UNIT) WHOSE TYPE IS DECLARED
27 -- OUTSIDE THIS UNIT.
29 -- WEI 3/ 4/82
30 -- JBG 2/20/84
31 -- TBN 11/25/85 RENAMED FROM C940ACB-B.ADA.
33 WITH REPORT;
34 USE REPORT;
35 PROCEDURE C94002D IS
37 TASK TYPE TT1 IS
38 ENTRY E1;
39 ENTRY E2;
40 END TT1;
42 TYPE ATT1 IS ACCESS TT1;
43 OUTER_TT1 : ATT1;
45 TASK BODY TT1 IS
46 BEGIN
47 ACCEPT E1;
48 ACCEPT E2;
49 END TT1;
51 BEGIN
52 TEST ("C94002D", "DEPENDENCY IS INDEPENDENT OF WHERE ACCESS " &
53 "VARIABLE IS DECLARED");
55 BLOCK1 :
56 DECLARE
57 POINTER_TT1 : ATT1 := NEW TT1;
58 BEGIN
59 OUTER_TT1 := POINTER_TT1;
60 POINTER_TT1.ALL.E1;
61 END BLOCK1; -- MAY DEADLOCK HERE IF INCORRECT DEPENDENCY
62 -- RULE IS IMPLEMENTED.
64 IF OUTER_TT1.ALL'TERMINATED THEN
65 FAILED ("NON-DEPENDENT TASK IS TERMINATED " &
66 "IMMEDIATELY AFTER ENCLOSING UNIT HAS " &
67 "BEEN COMPLETED");
68 END IF;
70 OUTER_TT1.E2; -- RELEASE TASK
72 RESULT;
74 END C94002D;