OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c5/] [c55b06a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C55B06A.ADA
2
 
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.
15
--
16
--                                    DISCLAIMER
17
--
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 LOOPS MAY BE SPECIFIED FOR BOOLEAN, INTEGER,
26
-- CHARACTER, ENUMERATION, AND DERIVED TYPES, INCLUDING
27
-- TYPES DERIVED FROM DERIVED TYPES. DERIVED BOOLEAN IS NOT
28
-- TESTED IN THIS TEST.
29
 
30
-- DAT 3/26/81
31
-- JBG 9/29/82
32
-- SPS 3/11/83
33
-- JBG 10/5/83
34
-- PWN 01/31/95  REMOVED INCONSISTENCIES WITH ADA 9X.
35
 
36
WITH REPORT; USE REPORT;
37
 
38
PROCEDURE C55B06A IS
39
 
40
     TYPE ENUM IS ('A', 'B', 'D', 'C', Z, X, D, A, C);
41
 
42
     TYPE D1 IS NEW CHARACTER RANGE 'A' .. 'Z';
43
     TYPE D2 IS NEW INTEGER;
44
     TYPE D3 IS NEW ENUM;
45
     TYPE D4 IS NEW D1;
46
     TYPE D5 IS NEW D2;
47
     TYPE D6 IS NEW D3;
48
 
49
     ONE : INTEGER := IDENT_INT(1);
50
     COUNT : INTEGER := 0;
51
     OLDCOUNT : INTEGER := 0;
52
 
53
     PROCEDURE Q IS
54
     BEGIN
55
          COUNT := COUNT + ONE;
56
     END Q;
57
 
58
BEGIN
59
     TEST ("C55B06A", "TEST LOOPS FOR ALL DISCRETE TYPES");
60
 
61
     FOR I IN BOOLEAN LOOP
62
          Q;
63
     END LOOP;
64
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
65
          FAILED ("LOOP 1");
66
     END IF;
67
     OLDCOUNT := COUNT;
68
 
69
     FOR I IN FALSE .. TRUE LOOP
70
          Q;
71
     END LOOP;
72
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
73
          FAILED ("LOOP 2");
74
     END IF;
75
     OLDCOUNT := COUNT;
76
 
77
     FOR I IN BOOLEAN RANGE FALSE .. TRUE LOOP
78
          Q;
79
     END LOOP;
80
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
81
          FAILED ("LOOP 3");
82
     END IF;
83
     OLDCOUNT := COUNT;
84
 
85
     FOR I IN INTEGER LOOP
86
          Q;
87
          EXIT WHEN I = INTEGER'FIRST + 2;
88
     END LOOP;
89
     IF OLDCOUNT + IDENT_INT(3) /= COUNT THEN
90
          FAILED ("LOOP 4");
91
     END IF;
92
     OLDCOUNT := COUNT;
93
 
94
     FOR I IN 3 .. IDENT_INT (5) LOOP
95
          Q;
96
     END LOOP;
97
     IF OLDCOUNT + IDENT_INT(3) /= COUNT THEN
98
          FAILED ("LOOP 5");
99
     END IF;
100
     OLDCOUNT := COUNT;
101
 
102
     FOR I IN INTEGER RANGE -2 .. -1 LOOP
103
          Q;
104
     END LOOP;
105
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
106
          FAILED ("LOOP 6");
107
     END IF;
108
     OLDCOUNT := COUNT;
109
 
110
     FOR I IN INTEGER RANGE INTEGER'FIRST .. INTEGER'FIRST + 1 LOOP
111
          Q;
112
     END LOOP;
113
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
114
          FAILED ("LOOP 7");
115
     END IF;
116
     OLDCOUNT := COUNT;
117
 
118
     FOR I IN 'A' .. CHARACTER'('Z') LOOP
119
          Q;
120
     END LOOP;
121
     IF OLDCOUNT + IDENT_INT(26) /= COUNT THEN
122
          FAILED ("LOOP 9");
123
     END IF;
124
     OLDCOUNT := COUNT;
125
 
126
     FOR I IN CHARACTER RANGE 'A' .. 'D' LOOP
127
          Q;
128
     END LOOP;
129
     IF OLDCOUNT + IDENT_INT(4) /= COUNT THEN
130
          FAILED ("LOOP 10");
131
     END IF;
132
     OLDCOUNT := COUNT;
133
 
134
     FOR I IN ENUM LOOP
135
          Q;
136
     END LOOP;
137
     IF OLDCOUNT + IDENT_INT(9) /= COUNT THEN
138
          FAILED ("LOOP 11");
139
     END IF;
140
     OLDCOUNT := COUNT;
141
 
142
     FOR I IN ENUM RANGE D .. C LOOP
143
          Q;
144
     END LOOP;
145
     IF OLDCOUNT + IDENT_INT(3) /= COUNT THEN
146
          FAILED ("LOOP 12");
147
     END IF;
148
     OLDCOUNT := COUNT;
149
 
150
     FOR I IN 'A' .. ENUM'(Z) LOOP
151
          Q;
152
     END LOOP;
153
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
154
          FAILED ("LOOP 13");
155
     END IF;
156
     OLDCOUNT := COUNT;
157
 
158
     FOR I IN D1 LOOP
159
          Q;
160
     END LOOP;
161
     IF OLDCOUNT + IDENT_INT(26) /= COUNT THEN
162
          FAILED ("LOOP 14");
163
     END IF;
164
     OLDCOUNT := COUNT;
165
 
166
     FOR I IN D1 RANGE 'A' .. 'Z' LOOP
167
          Q;
168
     END LOOP;
169
     IF OLDCOUNT + IDENT_INT(26) /= COUNT THEN
170
          FAILED ("LOOP 15");
171
     END IF;
172
     OLDCOUNT := COUNT;
173
 
174
     FOR I IN D1'('A') .. 'D' LOOP
175
          Q;
176
     END LOOP;
177
     IF OLDCOUNT + IDENT_INT(4) /= COUNT THEN
178
          FAILED ("LOOP 16");
179
     END IF;
180
     OLDCOUNT := COUNT;
181
 
182
     FOR I IN D2 LOOP
183
          Q;
184
          IF I > D2'FIRST + 3 THEN
185
               EXIT;
186
          END IF;
187
     END LOOP;
188
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
189
          FAILED ("LOOP 17");
190
     END IF;
191
     OLDCOUNT := COUNT;
192
 
193
     FOR I IN D2 RANGE -100 .. -99 LOOP
194
          Q;
195
     END LOOP;
196
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
197
          FAILED ("LOOP 18");
198
     END IF;
199
     OLDCOUNT := COUNT;
200
 
201
     FOR I IN D2'(1) .. 2 LOOP
202
          Q;
203
     END LOOP;
204
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
205
          FAILED ("LOOP 19");
206
     END IF;
207
     OLDCOUNT := COUNT;
208
 
209
     FOR I IN D3 LOOP
210
          IF I IN 'A' .. 'C' THEN
211
               Q;        -- 4
212
          ELSE
213
               Q; Q;     -- 10
214
          END IF;
215
     END LOOP;
216
     IF OLDCOUNT + IDENT_INT(14) /= COUNT THEN
217
          FAILED ("LOOP 20");
218
     END IF;
219
     OLDCOUNT := COUNT;
220
 
221
     FOR I IN D3 RANGE 'A' .. Z LOOP
222
          Q;
223
     END LOOP;
224
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
225
          FAILED ("LOOP 21");
226
     END IF;
227
     OLDCOUNT := COUNT;
228
 
229
     FOR I IN 'A' .. D3'(Z) LOOP
230
          Q;
231
     END LOOP;
232
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
233
          FAILED ("LOOP 22");
234
     END IF;
235
     OLDCOUNT := COUNT;
236
 
237
     FOR I IN D4 LOOP
238
          Q;
239
     END LOOP;
240
     IF OLDCOUNT + IDENT_INT(26) /= COUNT THEN
241
          FAILED ("LOOP 23");
242
     END IF;
243
     OLDCOUNT := COUNT;
244
 
245
     FOR I IN D4'('A') .. 'Z' LOOP
246
          Q;
247
     END LOOP;
248
     IF OLDCOUNT + IDENT_INT(26) /= COUNT THEN
249
          FAILED ("LOOP 24");
250
     END IF;
251
     OLDCOUNT := COUNT;
252
 
253
     FOR I IN D4 RANGE 'B' .. 'D' LOOP
254
          Q;
255
     END LOOP;
256
     IF OLDCOUNT + IDENT_INT(3) /= COUNT THEN
257
          FAILED ("LOOP 25");
258
     END IF;
259
     OLDCOUNT := COUNT;
260
 
261
     FOR J IN D5 LOOP
262
          Q;        -- 4
263
          EXIT WHEN J = D5(INTEGER'FIRST) + 3;
264
          Q;        -- 3
265
     END LOOP;
266
     IF OLDCOUNT + IDENT_INT(7) /= COUNT THEN
267
          FAILED ("LOOP 26");
268
     END IF;
269
     OLDCOUNT := COUNT;
270
 
271
     FOR J IN D5 RANGE -2 .. -1 LOOP
272
          Q;
273
     END LOOP;
274
     IF OLDCOUNT + IDENT_INT(2) /= COUNT THEN
275
          FAILED ("LOOP 27");
276
     END IF;
277
     OLDCOUNT := COUNT;
278
 
279
     FOR  J IN D5'(-10) .. D5'(-6) LOOP
280
          Q;
281
     END LOOP;
282
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
283
          FAILED ("LOOP 28");
284
     END IF;
285
     OLDCOUNT := COUNT;
286
 
287
     FOR J IN D6 LOOP
288
          Q;
289
     END LOOP;
290
     IF OLDCOUNT + IDENT_INT(9) /= COUNT THEN
291
          FAILED ("LOOP 29");
292
     END IF;
293
     OLDCOUNT := COUNT;
294
 
295
     FOR J IN D6 RANGE Z .. A LOOP
296
          Q;
297
     END LOOP;
298
     IF OLDCOUNT + IDENT_INT(4) /= COUNT THEN
299
          FAILED ("LOOP 30");
300
     END IF;
301
     OLDCOUNT := COUNT;
302
 
303
     FOR J IN D6'('D') .. D LOOP
304
          Q;
305
     END LOOP;
306
     IF OLDCOUNT + IDENT_INT(5) /= COUNT THEN
307
          FAILED ("LOOP 31");
308
     END IF;
309
     OLDCOUNT := COUNT;
310
 
311
 
312
     RESULT;
313
END C55B06A;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.