3 -- Grant of Unlimited Rights
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
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.
25 -- CHECK THAT IF A FORMAL ACCESS TYPE OF A GENERIC UNIT DESIGNATES A
26 -- FORMAL LIMITED PRIVATE TYPE, THEN WHEN THE UNIT IS INSTANTIATED WITH
27 -- A TASK TYPE OR A TYPE HAVING A SUBCOMPONENT OF A TASK TYPE, THE
28 -- MASTER FOR ANY TASKS ALLOCATED WITHIN THE INSTANTIATED UNIT IS
29 -- DETERMINED BY THE ACTUAL PARAMETER.
33 WITH REPORT
; USE REPORT
;
36 GLOBAL_INT
: INTEGER := 0;
37 MY_EXCEPTION
: EXCEPTION;
40 TYPE LIM_PRI_TASK
IS LIMITED PRIVATE;
41 PROCEDURE E
(T
: LIM_PRI_TASK
);
43 TASK TYPE LIM_PRI_TASK
IS
67 TASK BODY LIM_PRI_TASK
IS
70 GLOBAL_INT
:= IDENT_INT
(2);
73 PROCEDURE E
(T
: LIM_PRI_TASK
) IS
82 GLOBAL_INT
:= IDENT_INT
(1);
86 TYPE T
IS LIMITED PRIVATE;
87 TYPE ACC_T
IS ACCESS T
;
88 PROCEDURE PROC
(A
: OUT ACC_T
);
90 PROCEDURE PROC
(A
: OUT ACC_T
) IS
96 TYPE T
IS LIMITED PRIVATE;
97 TYPE ACC_T
IS ACCESS T
;
98 FUNCTION FUNC
RETURN ACC_T
;
100 FUNCTION FUNC
RETURN ACC_T
IS
106 TYPE T
IS LIMITED PRIVATE;
107 TYPE ACC_T
IS ACCESS T
;
109 PTR_T
: ACC_T
:= NEW T
;
113 TEST
("C94011A", "CHECK THAT IF A FORMAL ACCESS TYPE OF A " &
114 "GENERIC UNIT DESIGNATES A FORMAL LIMITED " &
115 "PRIVATE TYPE, THEN WHEN THE UNIT IS " &
116 "INSTANTIATED, THE MASTER FOR ANY TASKS " &
117 "ALLOCATED WITHIN THE INSTANTIATED UNIT IS " &
118 "DETERMINED BY THE ACTUAL PARAMETER");
120 -------------------------------------------------------------------
122 TYPE ACC_TT
IS ACCESS TT
;
124 PROCEDURE PROC1
IS NEW PROC
(TT
, ACC_TT
);
130 FAILED
("TASK DEPENDENT ON WRONG MASTER - 1");
132 IF GLOBAL_INT
= IDENT_INT
(0) THEN
133 FAILED
("TASK NOT DEPENDENT ON MASTER - 1");
136 -------------------------------------------------------------------
138 GLOBAL_INT
:= IDENT_INT
(0);
140 TYPE ACC_REC
IS ACCESS REC
;
142 FUNCTION FUNC1
IS NEW FUNC
(REC
, ACC_REC
);
151 FAILED
("TASK DEPENDENT ON WRONG MASTER - 2");
153 FAILED
("MY_EXCEPTION NOT RAISED - 2");
156 IF GLOBAL_INT
= IDENT_INT
(0) THEN
157 FAILED
("TASK NOT DEPENDENT ON MASTER - 2");
160 FAILED
("UNEXPECTED EXCEPTION RAISED - 2");
163 -------------------------------------------------------------------
164 GLOBAL_INT
:= IDENT_INT
(0);
168 TYPE ACC_LIM_TT
IS ACCESS LIM_PRI_TASK
;
172 FUNCTION FUNC2
IS NEW FUNC
(LIM_PRI_TASK
,
180 FAILED
("TASK DEPENDENT ON WRONG MASTER - 3");
182 IF GLOBAL_INT
= IDENT_INT
(0) THEN
183 FAILED
("TASK NOT DEPENDENT ON MASTER - 3");
187 -------------------------------------------------------------------
188 GLOBAL_INT
:= IDENT_INT
(0);
192 TYPE ACC_LIM_REC
IS ACCESS LIM_REC
;
196 PROCEDURE PROC2
IS NEW PROC
(LIM_REC
, ACC_LIM_REC
);
206 FAILED
("TASK DEPENDENT ON WRONG MASTER - 4");
208 FAILED
("MY_EXCEPTION NOT RAISED - 4");
211 IF GLOBAL_INT
= IDENT_INT
(0) THEN
212 FAILED
("TASK NOT DEPENDENT ON MASTER - 4");
215 FAILED
("UNEXPECTED EXCEPTION RAISED - 4");
218 -------------------------------------------------------------------
220 GLOBAL_INT
:= IDENT_INT
(0);
223 TYPE ACC_TT
IS ACCESS TT
;
224 PACKAGE PAC1
IS NEW PAC
(TT
, ACC_TT
);
233 FAILED
("TASK DEPENDENT ON WRONG MASTER - 5");
235 FAILED
("MY_EXCEPTION NOT RAISED - 5");
238 IF GLOBAL_INT
= IDENT_INT
(0) THEN
239 FAILED
("TASK NOT DEPENDENT ON MASTER - 5");
242 FAILED
("UNEXPECTED EXCEPTION RAISED - 5");
245 -------------------------------------------------------------------
246 GLOBAL_INT
:= IDENT_INT
(0);
249 TYPE ACC_LIM_REC
IS ACCESS LIM_REC
;
252 PACKAGE PAC2
IS NEW PAC
(LIM_REC
, ACC_LIM_REC
);
259 FAILED
("TASK DEPENDENT ON WRONG MASTER - 6");
261 IF GLOBAL_INT
= IDENT_INT
(0) THEN
262 FAILED
("TASK NOT DEPENDENT ON MASTER - 6");
265 -------------------------------------------------------------------