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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c45264a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C45264A.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 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.
29
 
30
-- PK  02/21/84
31
-- EG  05/30/84
32
 
33
WITH REPORT;
34
USE REPORT;
35
 
36
PROCEDURE C45264A IS
37
 
38
     SUBTYPE INT IS INTEGER RANGE 1 .. 3;
39
 
40
BEGIN
41
 
42
     TEST("C45264A","CHECK THAT EQUALITY COMPARISONS YIELD CORRECT " &
43
                    "RESULTS FOR ONE DIMENSIONAL AND MULTI-"         &
44
                    "DIMENSIONAL ARRAY TYPES");
45
 
46
     DECLARE
47
 
48
          TYPE A1 IS ARRAY(INT RANGE <>) OF INTEGER;
49
 
50
     BEGIN
51
 
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;
56
 
57
     EXCEPTION
58
 
59
          WHEN OTHERS =>
60
               FAILED ("A1 - EXCEPTION RAISED");
61
 
62
     END;
63
 
64
     DECLARE
65
 
66
          TYPE A2 IS ARRAY(INT RANGE <>, INT RANGE <>) OF INTEGER;
67
 
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;
75
 
76
     EXCEPTION
77
 
78
          WHEN OTHERS =>
79
                FAILED ("A2 - EXCEPTION RAISED");
80
 
81
     END;
82
 
83
     DECLARE
84
 
85
          TYPE A3 IS
86
               ARRAY(INT RANGE <>, INT RANGE <>, INT RANGE <>) OF
87
                    INTEGER;
88
 
89
     BEGIN
90
 
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;
99
 
100
     EXCEPTION
101
 
102
          WHEN OTHERS =>
103
                FAILED ("A3 - EXCEPTION RAISED");
104
 
105
     END;
106
 
107
     RESULT;
108
 
109
END C45264A;

powered by: WebSVN 2.1.0

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