summaryrefslogtreecommitdiff
path: root/gcc/testsuite/ada/acats/tests/cc/cc1224a.ada
blob: c419fb7e4763e34cf9d69cf106881322824c19a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
-- CC1224A.ADA

--                             Grant of Unlimited Rights
--
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
--     unlimited rights in the software and documentation contained herein.
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
--     this public release, the Government intends to confer upon all 
--     recipients unlimited rights  equal to those held by the Government.  
--     These rights include rights to use, duplicate, release or disclose the 
--     released technical data and computer software in whole or in part, in 
--     any manner and for any purpose whatsoever, and to have or permit others 
--     to do so.
--
--                                    DISCLAIMER
--
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
--     PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
--     FOR ARRAY TYPES WITH A NONLIMITED COMPONENT TYPE (OF A FORMAL
--     AND NONFORMAL GENERIC TYPE), CHECK THAT THE FOLLOWING OPERATIONS
--     ARE IMPLICITY DECLARED AND ARE, THEREFORE, AVAILABLE WITHIN THE
--     GENERIC UNIT: ASSIGNMENT, THE OPERATION ASSOCIATED WITH
--     AGGREGATE NOTATION, MEMBERSHIP TESTS, THE OPERATION ASSOCIATED
--     WITH INDEXED COMPONENTS, QUALIFICATION, EXPLICIT CONVERSION,
--     'SIZE, 'ADDRESS, 'FIRST, 'FIRST (N), 'LAST, 'LAST (N),
--     'RANGE, 'RANGE (N), 'LENGTH, 'LENGTH (N).

-- HISTORY:
--     R.WILLIAMS  10/6/86
--     EDWARD V. BERARD  8/10/90  ADDED CHECKS FOR MULTI-DIMENSIONAL
--                                ARRAYS
--     LDC  10/10/90  CHANGED DECLARATIONS OF AD1 - AD6 TO PROCEDURE
--                    CALLS OF FA1 - FA6 TO ADDRESS_CHECK AS SUGGESTED
--                    BY THE CRG. 
--     PWN  01/31/95  REMOVED INCONSISTENCIES WITH ADA 9X.

WITH SYSTEM ;
WITH REPORT ;

PROCEDURE CC1224A IS

     SHORT_START : CONSTANT := -10 ;
     SHORT_END   : CONSTANT := 10 ;

     TYPE SHORT_RANGE IS RANGE SHORT_START .. SHORT_END ;
     SHORT_LENGTH : CONSTANT NATURAL := (SHORT_END - SHORT_START + 1) ;

     MEDIUM_START    : CONSTANT := 1 ;
     MEDIUM_END      : CONSTANT := 15 ;

     TYPE MEDIUM_RANGE IS RANGE MEDIUM_START .. MEDIUM_END ;
     MEDIUM_LENGTH   : CONSTANT NATURAL := 
                                (MEDIUM_END - MEDIUM_START + 1) ;

     TYPE MONTH_TYPE IS (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG,
                         SEP, OCT, NOV, DEC) ;
     TYPE DAY_TYPE IS RANGE 1 .. 31 ;
     TYPE YEAR_TYPE IS RANGE 1904 .. 2050 ;
     TYPE DATE IS RECORD
          MONTH : MONTH_TYPE ;
          DAY   : DAY_TYPE ;
          YEAR  : YEAR_TYPE ;
     END RECORD ;

     TODAY : DATE := (AUG, 10, 1990) ;

     TYPE FIRST_TEMPLATE IS ARRAY (SHORT_RANGE RANGE <>,
                                   MEDIUM_RANGE RANGE <>) OF DATE ;

     TYPE SECOND_TEMPLATE IS ARRAY (SHORT_RANGE, MEDIUM_RANGE) 
                                   OF DATE ;

     FIRST_ARRAY     : FIRST_TEMPLATE (-10 .. 10, 6 .. 10) ;
     SECOND_ARRAY    : FIRST_TEMPLATE (0 .. 7, 1 .. 15) ;
     THIRD_ARRAY     : SECOND_TEMPLATE ;
     FOURTH_ARRAY    : SECOND_TEMPLATE ;

     SUBTYPE SUBINT IS INTEGER RANGE REPORT.IDENT_INT (1) .. 
                                     REPORT.IDENT_INT (6);

     TYPE ARRA IS ARRAY (SUBINT) OF SUBINT;
     A1 : ARRA := (REPORT.IDENT_INT (1) .. REPORT.IDENT_INT (6) => 1);
     A2 : ARRA := (A1'RANGE => 2);

     TYPE ARRB IS ARRAY (SUBINT RANGE <>) OF DATE ;
     A3 : ARRB (1 .. 6) := 
               (REPORT.IDENT_INT (1) .. REPORT.IDENT_INT (6) => TODAY);

     TYPE ARRC IS ARRAY (SUBINT RANGE <>, SUBINT RANGE <>) OF SUBINT;
     A4 : CONSTANT ARRC := (1 .. 6 => (1 .. 6 => 4));

     TYPE ARRD IS ARRAY (SUBINT, SUBINT) OF SUBINT;
     A5 : ARRD := (A4'RANGE (1) => (A4'RANGE (2) => 5));

     TYPE ARRE IS ARRAY (SUBINT) OF DATE ;
     A6 : ARRE := (A1'RANGE => TODAY);

     FUNCTION "=" (LEFT  : IN SYSTEM.ADDRESS ;
                   RIGHT : IN SYSTEM.ADDRESS ) RETURN BOOLEAN
              RENAMES SYSTEM."=" ;

     GENERIC

          TYPE T1 IS (<>);
          TYPE T2 IS PRIVATE;
          X2 : T2;

          TYPE FARR1 IS ARRAY (SUBINT) OF T1;
          FA1 : FARR1;

          TYPE FARR2 IS ARRAY (SUBINT) OF SUBINT;
          FA2 : FARR2;

          TYPE FARR3 IS ARRAY (SUBINT RANGE <>) OF T2;
          FA3 : FARR3;

          TYPE FARR4 IS ARRAY (SUBINT RANGE <>, SUBINT RANGE <>) OF T1;
          FA4 : FARR4;

          TYPE FARR5 IS ARRAY (SUBINT, SUBINT) OF SUBINT;
          FA5 : FARR5;

          TYPE FARR6 IS ARRAY (T1) OF T2;
          FA6 : FARR6;

          TYPE FARR7 IS ARRAY (T1) OF T2;
          FA7 : FARR7;

     PROCEDURE P ;

     GENERIC

          TYPE FIRST_INDEX IS (<>) ;
          TYPE SECOND_INDEX IS (<>) ;
          TYPE UNCONSTRAINED_ARRAY IS ARRAY 
               (FIRST_INDEX RANGE <>, SECOND_INDEX RANGE <>) OF DATE ;

     PROCEDURE TEST_PROCEDURE (FIRST        : IN UNCONSTRAINED_ARRAY ;
                               FFIFS        : IN FIRST_INDEX ;
                               FFILS        : IN FIRST_INDEX ;
                               FSIFS        : IN SECOND_INDEX ;
                               FSILS        : IN SECOND_INDEX ;
                               FFLEN        : IN NATURAL ;
                               FSLEN        : IN NATURAL ;
                               FFIRT        : IN FIRST_INDEX ;
                               FSIRT        : IN SECOND_INDEX ;
                               SECOND       : IN UNCONSTRAINED_ARRAY ;
                               SFIFS        : IN FIRST_INDEX ;
                               SFILS        : IN FIRST_INDEX ;
                               SSIFS        : IN SECOND_INDEX ;
                               SSILS        : IN SECOND_INDEX ;
                               SFLEN        : IN NATURAL ;
                               SSLEN        : IN NATURAL ;
                               SFIRT        : IN FIRST_INDEX ;
                               SSIRT        : IN SECOND_INDEX ;
                               REMARKS      : IN STRING) ;
     GENERIC

          TYPE FIRST_INDEX IS (<>) ;
          TYPE SECOND_INDEX IS (<>) ;
          TYPE COMPONENT_TYPE IS PRIVATE ;
          TYPE CONSTRAINED_ARRAY IS ARRAY 
               (FIRST_INDEX,SECOND_INDEX) OF COMPONENT_TYPE ;

     PROCEDURE CTEST_PROCEDURE (FIRST        : IN CONSTRAINED_ARRAY ;
                                FFIRT        : IN FIRST_INDEX ;
                                FSIRT        : IN SECOND_INDEX ;
                                SECOND       : IN CONSTRAINED_ARRAY ;
                                SFIRT        : IN FIRST_INDEX ;
                                SSIRT        : IN SECOND_INDEX ;
                                REMARKS      : IN STRING) ;


     PROCEDURE P IS

          IN1 : INTEGER := FA1'SIZE;
          IN2 : INTEGER := FA2'SIZE;
          IN3 : INTEGER := FA3'SIZE;
          IN4 : INTEGER := FA4'SIZE;
          IN5 : INTEGER := FA5'SIZE;
          IN6 : INTEGER := FA6'SIZE;

          B1 : FARR1;

          B2 : FARR2;

          SUBTYPE SARR3 IS FARR3 (FA3'RANGE);
          B3 : SARR3;

          SUBTYPE SARR4 IS FARR4 (FA4'RANGE (1), FA4'RANGE (2));
          B4 : SARR4;

          B5 : FARR5;

          B6 : FARR6 ;

          PROCEDURE ADDRESS_CHECK(ADDRESS : SYSTEM.ADDRESS) IS

          BEGIN
               IF REPORT.EQUAL(1, REPORT.IDENT_INT(2)) THEN
                    REPORT.COMMENT("DON'T OPTIMIZE OUT ADDRESS_CHECK");
               END IF;
          END ADDRESS_CHECK;

     BEGIN  -- P

          ADDRESS_CHECK(FA1'ADDRESS);
          ADDRESS_CHECK(FA2'ADDRESS);
          ADDRESS_CHECK(FA3'ADDRESS);
          ADDRESS_CHECK(FA4'ADDRESS);
          ADDRESS_CHECK(FA5'ADDRESS);
          ADDRESS_CHECK(FA6'ADDRESS);

          B1 := FA1;

          IF B1 /= FARR1 (FA1) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 1" );
          END IF;

          B2 := FA2;

          IF B2 /= FARR2 (A2) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 2" );
          END IF;

          B3 := FA3;

          IF B3 /= FARR3 (FA3) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 3" );
          END IF;

          B4 := FA4;

          IF B4 /= FARR4 (FA4) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 4" );
          END IF;

          B5 := FA5;

          IF B5 /= FARR5 (A5) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 5" );
          END IF;

          B6 := FA6;

          IF B6 /= FARR6 (FA6) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 6" );
          END IF;

          IF FA7 /= FARR7 (FA6) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 7" );
          END IF;

          B1 := FARR1'(FA1'RANGE => T1'VAL (1));

          IF B1 (1) /= FA1 (1) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 8" );
          END IF;

          B1 := FARR1'(1 => T1'VAL (1), 2 => T1'VAL (1), 
                       3 .. 6 => T1'VAL (2));

          IF B1 (1) /= FA1 (1) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 9" );
          END IF;

          B2 := FARR2'(FA2'RANGE => 2);

          IF B2 (2) /= FA2 (2) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 10" );
          END IF;

          B3 := FARR3'(1|2|3 => X2, 4|5|6 => X2);

          IF B3 (3) /= FA3 (3) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 11" );
          END IF;

          B4 := FARR4'(FA5'RANGE (1) => (FA5'RANGE (2) => T1'VAL (4)));

          IF B4 (4, 4) /= FA4 (4, 4) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 12" );
          END IF;

          B5 := FARR5'(REPORT.IDENT_INT (1) .. 
                       REPORT.IDENT_INT (6) =>  (1 .. 6 => 5));

          IF B5 (5, 5) /= FA5 (5, 5) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 13" );
          END IF;

          B6 := FARR6'(FA6'RANGE => X2);

          IF B6 (T1'FIRST) /= FA6 (T1'FIRST) THEN
               REPORT.FAILED ("INCORRECT RESULTS - 14" );
          END IF;

          IF B1 NOT IN FARR1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 15" );
          END IF;

          IF FA2 NOT IN FARR2 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 16" );
          END IF;

          IF FA3 NOT IN FARR3 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 17" );
          END IF;

          IF B4 NOT IN FARR4 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 18" );
          END IF;

          IF B5 NOT IN FARR5 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 19" );
          END IF;

          IF FA6 NOT IN FARR6 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 20" );
          END IF;

          IF FA1'LENGTH /= FA1'LAST - FA1'FIRST + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 27" );
          END IF;

          IF FA2'LENGTH /= FA2'LAST - FA2'FIRST + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 28" );
          END IF;

          IF FA3'LENGTH /= FA3'LAST - FA3'FIRST + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 29" );
          END IF;

          IF FA4'LENGTH /= FA4'LAST - FA4'FIRST + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 30" );
          END IF;

          IF FA4'LENGTH (2) /= FA4'LAST (2) - FA4'FIRST (2) + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 31" );
          END IF;

          IF FA5'LENGTH /= FA5'LAST - FA5'FIRST + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 32" );
          END IF;

          IF FA5'LENGTH (2) /= FA5'LAST (2) - FA5'FIRST (2) + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 33" );
          END IF;

          IF FA6'LENGTH /= T1'POS (FA6'LAST) - 
             T1'POS (FA6'FIRST) + 1 THEN
               REPORT.FAILED ("INCORRECT RESULTS - 34" );
          END IF;

     END P ;

     PROCEDURE TEST_PROCEDURE (FIRST        : IN UNCONSTRAINED_ARRAY ;
                               FFIFS        : IN FIRST_INDEX ;
                               FFILS        : IN FIRST_INDEX ;
                               FSIFS        : IN SECOND_INDEX ;
                               FSILS        : IN SECOND_INDEX ;
                               FFLEN        : IN NATURAL ;
                               FSLEN        : IN NATURAL ;
                               FFIRT        : IN FIRST_INDEX ;
                               FSIRT        : IN SECOND_INDEX ;
                               SECOND       : IN UNCONSTRAINED_ARRAY ;
                               SFIFS        : IN FIRST_INDEX ;
                               SFILS        : IN FIRST_INDEX ;
                               SSIFS        : IN SECOND_INDEX ;
                               SSILS        : IN SECOND_INDEX ;
                               SFLEN        : IN NATURAL ;
                               SSLEN        : IN NATURAL ;
                               SFIRT        : IN FIRST_INDEX ;
                               SSIRT        : IN SECOND_INDEX ;
                               REMARKS      : IN STRING) IS

     BEGIN -- TEST_PROCEDURE

          IF (FIRST'FIRST /= FFIFS) OR
             (FIRST'FIRST (1) /= FFIFS) OR
             (FIRST'FIRST (2) /= FSIFS) OR
             (SECOND'FIRST /= SFIFS) OR
             (SECOND'FIRST (1) /= SFIFS) OR
             (SECOND'FIRST (2) /= SSIFS) THEN
               REPORT.FAILED ("PROBLEMS WITH 'FIRST. " & REMARKS) ;
          END IF ;

          IF (FIRST'LAST /= FFILS) OR
             (FIRST'LAST (1) /= FFILS) OR
             (FIRST'LAST (2) /= FSILS) OR
             (SECOND'LAST /= SFILS) OR
             (SECOND'LAST (1) /= SFILS) OR
             (SECOND'LAST (2) /= SSILS) THEN
               REPORT.FAILED ("PROBLEMS WITH 'LAST. " & REMARKS) ;
          END IF ;

          IF (FIRST'LENGTH /= FFLEN) OR
             (FIRST'LENGTH (1) /= FFLEN) OR
             (FIRST'LENGTH (2) /= FSLEN) OR
             (SECOND'LENGTH /= SFLEN) OR
             (SECOND'LENGTH (1) /= SFLEN) OR
             (SECOND'LENGTH (2) /= SSLEN) THEN
               REPORT.FAILED ("PROBLEMS WITH 'LENGTH. " & REMARKS) ;
          END IF ;

          IF (FFIRT NOT IN FIRST'RANGE (1)) OR
             (FFIRT NOT IN FIRST'RANGE) OR
             (SFIRT NOT IN SECOND'RANGE (1)) OR
             (SFIRT NOT IN SECOND'RANGE) OR
             (FSIRT NOT IN FIRST'RANGE (2)) OR
             (SSIRT NOT IN SECOND'RANGE (2)) THEN
               REPORT.FAILED ("INCORRECT HANDLING OF 'RANGE ATTRIBUE. " &
                              REMARKS) ;
          END IF ;

     END TEST_PROCEDURE ;

     PROCEDURE CTEST_PROCEDURE (FIRST        : IN CONSTRAINED_ARRAY ;
                                FFIRT        : IN FIRST_INDEX ;
                                FSIRT        : IN SECOND_INDEX ;
                                SECOND       : IN CONSTRAINED_ARRAY ;
                                SFIRT        : IN FIRST_INDEX ;
                                SSIRT        : IN SECOND_INDEX ;
                                REMARKS      : IN STRING) IS

     BEGIN -- CTEST_PROCEDURE

          IF (FIRST'FIRST /= FIRST_INDEX'FIRST) OR
             (FIRST'FIRST (1) /= FIRST_INDEX'FIRST) OR
             (FIRST'FIRST (2) /= SECOND_INDEX'FIRST) OR
             (SECOND'FIRST /= FIRST_INDEX'FIRST) OR
             (SECOND'FIRST (1) /= FIRST_INDEX'FIRST) OR
             (SECOND'FIRST (2) /= SECOND_INDEX'FIRST) THEN
               REPORT.FAILED ("PROBLEMS WITH 'FIRST. " & REMARKS) ;
          END IF ;

          IF (FIRST'LAST /= FIRST_INDEX'LAST) OR
             (FIRST'LAST (1) /= FIRST_INDEX'LAST) OR
             (FIRST'LAST (2) /= SECOND_INDEX'LAST) OR
             (SECOND'LAST /= FIRST_INDEX'LAST) OR
             (SECOND'LAST (1) /= FIRST_INDEX'LAST) OR
             (SECOND'LAST (2) /= SECOND_INDEX'LAST) THEN
               REPORT.FAILED ("PROBLEMS WITH 'LAST. " & REMARKS) ;
          END IF ;

          IF (FIRST'LENGTH /=
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
             (FIRST'LENGTH (1) /= 
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
             (FIRST'LENGTH (2) /=
              SECOND_INDEX'POS (SECOND_INDEX'LAST)
              - SECOND_INDEX'POS (SECOND_INDEX'FIRST) + 1) OR
             (SECOND'LENGTH /= 
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
             (SECOND'LENGTH (1) /=
              FIRST_INDEX'POS (FIRST_INDEX'LAST)
              - FIRST_INDEX'POS (FIRST_INDEX'FIRST) + 1) OR
             (SECOND'LENGTH (2) /=
              SECOND_INDEX'POS (SECOND_INDEX'LAST)
              - SECOND_INDEX'POS (SECOND_INDEX'FIRST) + 1) THEN
               REPORT.FAILED ("PROBLEMS WITH 'LENGTH. " & REMARKS) ;
          END IF ;

          IF (FFIRT NOT IN FIRST'RANGE (1)) OR
             (FFIRT NOT IN FIRST'RANGE) OR
             (SFIRT NOT IN SECOND'RANGE (1)) OR
             (SFIRT NOT IN SECOND'RANGE) OR
             (FSIRT NOT IN FIRST'RANGE (2)) OR
             (SSIRT NOT IN SECOND'RANGE (2)) THEN
                REPORT.FAILED ("INCORRECT HANDLING OF 'RANGE ATTRIBUE. " &
                               REMARKS) ;
          END IF ;

          IF CONSTRAINED_ARRAY'SIZE <= 0 THEN
               REPORT.FAILED ("PROBLEMS WITH THE 'SIZE ATTRIBUTE. " &
                              REMARKS) ;
          END IF ;

          IF FIRST'ADDRESS = SECOND'ADDRESS THEN
               REPORT.FAILED ("PROBLEMS WITH THE 'ADDRESS ATTRIBUTE. " &
                              REMARKS) ;
          END IF ;

     END CTEST_PROCEDURE ;

     PROCEDURE FIRST_TEST_PROCEDURE IS NEW TEST_PROCEDURE 
               (FIRST_INDEX            => SHORT_RANGE,
                SECOND_INDEX           => MEDIUM_RANGE,
                UNCONSTRAINED_ARRAY    => FIRST_TEMPLATE) ;

     PROCEDURE NEW_CTEST_PROCEDURE IS NEW CTEST_PROCEDURE 
               (FIRST_INDEX           => SHORT_RANGE,
                SECOND_INDEX          => MEDIUM_RANGE,
                COMPONENT_TYPE        => DATE,
                CONSTRAINED_ARRAY     => SECOND_TEMPLATE) ;

     PROCEDURE NP IS NEW P (SUBINT, DATE, TODAY, ARRA, A1, 
                            ARRA, A2, ARRB, A3, ARRC, A4, ARRD,
                            A5, ARRE, A6, ARRE, A6);

BEGIN  -- CC1224A

     REPORT.TEST ("CC1224A", "FOR ARRAY TYPES WITH A NONLIMITED " &
                  "COMPONENT TYPE (OF A FORMAL AND NONFORMAL GENERIC " &
                  "TYPE), CHECK THAT THE FOLLOWING OPERATIONS " &
                  "ARE IMPLICITY DECLARED AND ARE, THEREFORE, " &
                  "AVAILABLE WITHIN THE GENERIC -- UNIT: " &
                  "ASSIGNMENT, THE OPERATION ASSOCIATED WITH " &
                  "AGGREGATE NOTATION, MEMBERSHIP TESTS, THE " &
                  "OPERATION ASSOCIATED WITH INDEXED " &
                  "COMPONENTS, QUALIFICATION, EXPLICIT " &
                  "CONVERSION, 'SIZE, 'ADDRESS, 'FIRST, " &
                  "'FIRST (N), 'LAST, 'LAST (N), 'RANGE, " &
                  "'RANGE (N), 'LENGTH, 'LENGTH (N)" ) ;

     NP ;

     FIRST_TEST_PROCEDURE (FIRST        => FIRST_ARRAY,
                           FFIFS        => -10,
                           FFILS        => 10,
                           FSIFS        => 6,
                           FSILS        => 10,
                           FFLEN        => 21,
                           FSLEN        => 5,
                           FFIRT        => 0,
                           FSIRT        => 8,
                           SECOND       => SECOND_ARRAY,
                           SFIFS        => 0,
                           SFILS        => 7,
                           SSIFS        => 1,
                           SSILS        => 15,
                           SFLEN        => 8,
                           SSLEN        => 15,
                           SFIRT        => 5,
                           SSIRT        => 13,
                           REMARKS      => "FIRST_TEST_PROCEDURE") ;

     NEW_CTEST_PROCEDURE (FIRST         => THIRD_ARRAY,
                          FFIRT         => -5,
                          FSIRT         => 11,
                          SECOND        => FOURTH_ARRAY,
                          SFIRT         => 0,
                          SSIRT         => 14,
                          REMARKS       => "NEW_CTEST_PROCEDURE") ;

     REPORT.RESULT ;

END CC1224A;