Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / ada / acats / tests / c4 / c45264a.ada
blobd701be0f6387d74c22ae7f5270fb5f1485cd51de
1 -- C45264A.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 EQUALITY COMPARISONS YIELD CORRECT RESULTS FOR ONE
26 -- DIMENSIONAL AND MULTI-DIMENSIONAL ARRAY TYPES.
27 -- CASE THAT CHECKS THAT TWO NULL ARRAYS OF THE SAME TYPE ARE
28 -- ALWAYS EQUAL.
30 -- PK 02/21/84
31 -- EG 05/30/84
33 WITH REPORT;
34 USE REPORT;
36 PROCEDURE C45264A IS
38 SUBTYPE INT IS INTEGER RANGE 1 .. 3;
40 BEGIN
42 TEST("C45264A","CHECK THAT EQUALITY COMPARISONS YIELD CORRECT " &
43 "RESULTS FOR ONE DIMENSIONAL AND MULTI-" &
44 "DIMENSIONAL ARRAY TYPES");
46 DECLARE
48 TYPE A1 IS ARRAY(INT RANGE <>) OF INTEGER;
50 BEGIN
52 IF A1'(1 .. IDENT_INT(2) => IDENT_INT(1)) /=
53 A1'(IDENT_INT(2) .. 3 => IDENT_INT(1)) THEN
54 FAILED ("A1 - ARRAYS NOT EQUAL");
55 END IF;
57 EXCEPTION
59 WHEN OTHERS =>
60 FAILED ("A1 - EXCEPTION RAISED");
62 END;
64 DECLARE
66 TYPE A2 IS ARRAY(INT RANGE <>, INT RANGE <>) OF INTEGER;
68 BEGIN
69 IF A2'(1 .. IDENT_INT(2) =>
70 (IDENT_INT(3) .. IDENT_INT(2) => IDENT_INT(1))) /=
71 A2'(IDENT_INT(2) .. 3 =>
72 (IDENT_INT(2) .. IDENT_INT(1) => IDENT_INT(1))) THEN
73 FAILED ("A2 - ARRAYS NOT EQUAL");
74 END IF;
76 EXCEPTION
78 WHEN OTHERS =>
79 FAILED ("A2 - EXCEPTION RAISED");
81 END;
83 DECLARE
85 TYPE A3 IS
86 ARRAY(INT RANGE <>, INT RANGE <>, INT RANGE <>) OF
87 INTEGER;
89 BEGIN
91 IF A3'(1 .. IDENT_INT(2) =>
92 (IDENT_INT(1) .. IDENT_INT(3) =>
93 (IDENT_INT(3) .. IDENT_INT(2) => IDENT_INT(1)))) /=
94 A3'(IDENT_INT(1) .. 3 =>
95 (IDENT_INT(2) .. IDENT_INT(1) =>
96 (IDENT_INT(1) .. IDENT_INT(2) => IDENT_INT(1)))) THEN
97 FAILED ("A3 - ARRAYS NOT EQUAL");
98 END IF;
100 EXCEPTION
102 WHEN OTHERS =>
103 FAILED ("A3 - EXCEPTION RAISED");
105 END;
107 RESULT;
109 END C45264A;