Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / ada / acats / tests / c9 / c99005a.ada
blobf3bcbaa6ef0ee3347118b9d73b07618333fcfce3
1 -- C99005A.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 -- OBJECTIVE:
26 -- CHECK THAT THE ATTRIBUTE 'COUNT RETURNS THE CORRECT VALUE.
28 -- HISTORY:
29 -- DHH 03/24/88 CREATED ORIGINAL TEST.
31 with Impdef;
32 WITH SYSTEM; USE SYSTEM;
33 WITH REPORT; USE REPORT;
34 PROCEDURE C99005A IS
36 BEGIN
38 TEST("C99005A", "CHECK THAT THE ATTRIBUTE 'COUNT RETURNS THE " &
39 "CORRECT VALUE");
41 DECLARE
42 TASK A IS
43 END A;
45 TASK B IS
46 END B;
48 TASK C IS
49 END C;
51 TASK D IS
52 END D;
54 TASK E IS
55 END E;
57 TASK F IS
58 END F;
60 TASK G IS
61 END G;
63 TASK H IS
64 END H;
66 TASK I IS
67 END I;
69 TASK J IS
70 END J;
72 TASK T IS
73 ENTRY WAIT;
74 END T;
76 TASK CHOICE IS
77 ENTRY RETURN_CALL;
78 ENTRY E2;
79 ENTRY E1;
80 END CHOICE;
82 TASK BODY A IS
83 BEGIN
84 CHOICE.E1;
85 END A;
87 TASK BODY B IS
88 BEGIN
89 CHOICE.E1;
90 END B;
92 TASK BODY C IS
93 BEGIN
94 CHOICE.E1;
95 END C;
97 TASK BODY D IS
98 BEGIN
99 CHOICE.E1;
100 END D;
102 TASK BODY E IS
103 BEGIN
104 CHOICE.E1;
105 END E;
107 TASK BODY F IS
108 BEGIN
109 CHOICE.E2;
110 END F;
112 TASK BODY G IS
113 BEGIN
114 CHOICE.E2;
115 END G;
117 TASK BODY H IS
118 BEGIN
119 CHOICE.E2;
120 END H;
122 TASK BODY I IS
123 BEGIN
124 CHOICE.E2;
125 END I;
127 TASK BODY J IS
128 BEGIN
129 CHOICE.E2;
130 END J;
132 TASK BODY T IS
133 BEGIN
134 LOOP
135 SELECT
136 ACCEPT WAIT DO
137 DELAY 1.0 * Impdef.One_Second;
138 END WAIT;
139 CHOICE.RETURN_CALL;
141 TERMINATE;
142 END SELECT;
143 END LOOP;
144 END T;
146 TASK BODY CHOICE IS
147 BEGIN
148 WHILE E1'COUNT + E2'COUNT < 10 LOOP
149 T.WAIT;
150 ACCEPT RETURN_CALL;
151 END LOOP;
153 FOR I IN REVERSE 1 ..10 LOOP
154 SELECT
155 ACCEPT E2 DO
156 IF (E2'COUNT + E1'COUNT + 1) /= I THEN
157 FAILED("'COUNT NOT RETURNING " &
158 "CORRECT VALUE FOR LOOP" &
159 INTEGER'IMAGE(I) & "VALUE " &
160 INTEGER'IMAGE((E2'COUNT
161 + E1'COUNT + 1)));
162 END IF;
163 END E2;
165 ACCEPT E1 DO
166 IF (E2'COUNT + E1'COUNT + 1) /= I THEN
167 FAILED("'COUNT NOT RETURNING " &
168 "CORRECT VALUE FOR LOOP" &
169 INTEGER'IMAGE(I) & "VALUE " &
170 INTEGER'IMAGE((E2'COUNT
171 + E1'COUNT + 1)));
172 END IF;
173 END E1;
174 END SELECT;
175 END LOOP;
176 END CHOICE;
178 BEGIN
179 NULL;
180 END;
182 RESULT;
183 END C99005A;