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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c4/] [c43204e.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C43204E.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
-- OBJECTIVE:
26
--     CHECK THAT AN ARRAY AGGREGATE WITH AN OTHERS CHOICE CAN APPEAR
27
--     AS THE INITIALIZATION EXPRESSION OF A CONSTRAINED CONSTANT,
28
--     VARIABLE OBJECT DECLARATION, OR RECORD COMPONENT DECLARATION,
29
--     AND THAT THE BOUNDS OF THE AGGREGATE ARE DETERMINED CORRECTLY.
30
 
31
-- HISTORY:
32
--     JET 08/15/88  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
PROCEDURE C43204E IS
36
 
37
     TYPE ARR11 IS ARRAY (INTEGER RANGE -3 .. 3) OF INTEGER;
38
     TYPE ARR12 IS ARRAY (IDENT_INT(-3) .. IDENT_INT(3)) OF INTEGER;
39
     TYPE ARR13 IS ARRAY (IDENT_INT(1) .. IDENT_INT(-1)) OF INTEGER;
40
     TYPE ARR21 IS ARRAY (INTEGER RANGE -1 .. 1,
41
                          INTEGER RANGE -1 .. 1) OF INTEGER;
42
     TYPE ARR22 IS ARRAY (IDENT_INT(-1) .. IDENT_INT(1),
43
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
44
     TYPE ARR23 IS ARRAY (INTEGER RANGE -1 .. 1,
45
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
46
     TYPE ARR24 IS ARRAY (IDENT_INT(1) .. IDENT_INT(-1),
47
                          IDENT_INT(-1) .. IDENT_INT(1)) OF INTEGER;
48
 
49
     CA11 : CONSTANT ARR11 := (1, OTHERS => IDENT_INT(2));
50
     CA12 : CONSTANT ARR12 := (OTHERS => IDENT_INT(2));
51
     CA13 : CONSTANT ARR13 := (OTHERS => IDENT_INT(2));
52
     CA21 : CONSTANT ARR21 := (OTHERS => (-1..1 => IDENT_INT(2)));
53
     CA22 : CONSTANT ARR22 := (OTHERS => (-1..1 => IDENT_INT(2)));
54
     CA23 : CONSTANT ARR23 := (-1..1 => (OTHERS => IDENT_INT(2)));
55
     CA24 : CONSTANT ARR24 := (OTHERS => (OTHERS => IDENT_INT(2)));
56
 
57
     VA11 : ARR11 := (1,1, OTHERS => IDENT_INT(2));
58
     VA12 : ARR12 := (OTHERS => IDENT_INT(2));
59
     VA13 : ARR13 := (OTHERS => IDENT_INT(2));
60
     VA21 : ARR21 := ((1,1,1), OTHERS => (-1..1 => IDENT_INT(2)));
61
     VA22 : ARR22 := (-1 => (1,1,1), 0..1 => (OTHERS => IDENT_INT(2)));
62
     VA23 : ARR23 := (OTHERS => (OTHERS => IDENT_INT(2)));
63
     VA24 : ARR24 := (OTHERS => (OTHERS => IDENT_INT(2)));
64
 
65
     TYPE REC IS RECORD
66
          RA11 : ARR11 := (1,1,1, OTHERS => IDENT_INT(2));
67
          RA12 : ARR12 := (OTHERS => IDENT_INT(2));
68
          RA13 : ARR13 := (OTHERS => IDENT_INT(2));
69
          RA21 : ARR21 := ((1,1,1), (1,1,1), OTHERS => (IDENT_INT(2),
70
                           IDENT_INT(2), IDENT_INT(2)));
71
          RA22 : ARR22 := (OTHERS => (OTHERS => IDENT_INT(2)));
72
          RA23 : ARR23 := (-1 => (OTHERS => 1),
73
                           0..1 => (OTHERS => IDENT_INT(2)));
74
          RA24 : ARR24 := (OTHERS => (OTHERS => IDENT_INT(2)));
75
     END RECORD;
76
 
77
     R : REC;
78
 
79
BEGIN
80
     TEST ("C43204E", "CHECK THAT AN ARRAY AGGREGATE WITH AN OTHERS " &
81
                      "CHOICE CAN APPEAR AS THE INITIALIZATION " &
82
                      "EXPRESSION OF A CONSTRAINED CONSTANT, " &
83
                      "VARIABLE OBJECT DECLARATION, OR RECORD " &
84
                      "COMPONENT DECLARATION, AND THAT THE BOUNDS OF " &
85
                      "THE AGGREGATE ARE DETERMINED CORRECTLY");
86
 
87
     IF CA11 /= (1, 2, 2, 2, 2, 2, 2) THEN
88
          FAILED("INCORRECT VALUE OF CA11");
89
     END IF;
90
 
91
     IF CA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
92
          FAILED("INCORRECT VALUE OF CA12");
93
     END IF;
94
 
95
     IF CA13'LENGTH /= 0 THEN
96
          FAILED("INCORRECT VALUE OF CA13");
97
     END IF;
98
 
99
     IF CA21 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
100
          FAILED("INCORRECT VALUE OF CA21");
101
     END IF;
102
 
103
     IF CA22 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
104
          FAILED("INCORRECT VALUE OF CA22");
105
     END IF;
106
 
107
     IF CA23 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
108
          FAILED("INCORRECT VALUE OF CA23");
109
     END IF;
110
 
111
     IF CA24'LENGTH /= 0 OR CA24'LENGTH(2) /= 3 THEN
112
          FAILED("INCORRECT VALUE OF CA24");
113
     END IF;
114
 
115
     IF VA11 /= (1, 1, 2, 2, 2, 2, 2) THEN
116
          FAILED("INCORRECT VALUE OF VA11");
117
     END IF;
118
 
119
     IF VA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
120
          FAILED("INCORRECT VALUE OF VA12");
121
     END IF;
122
 
123
     IF VA13'LENGTH /= 0 THEN
124
          FAILED("INCORRECT VALUE OF VA13");
125
     END IF;
126
 
127
     IF VA21 /= ((1,1,1), (2,2,2), (2,2,2)) THEN
128
          FAILED("INCORRECT VALUE OF VA21");
129
     END IF;
130
 
131
     IF VA22 /= ((1,1,1), (2,2,2), (2,2,2)) THEN
132
          FAILED("INCORRECT VALUE OF VA22");
133
     END IF;
134
 
135
     IF VA23 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
136
          FAILED("INCORRECT VALUE OF VA23");
137
     END IF;
138
 
139
     IF VA24'LENGTH /= 0 OR VA24'LENGTH(2) /= 3 THEN
140
          FAILED("INCORRECT VALUE OF VA24");
141
     END IF;
142
 
143
     IF R.RA11 /= (1, 1, 1, 2, 2, 2, 2) THEN
144
          FAILED("INCORRECT VALUE OF RA11");
145
     END IF;
146
 
147
     IF R.RA12 /= (2, 2, 2, 2, 2, 2, 2) THEN
148
          FAILED("INCORRECT VALUE OF RA12");
149
     END IF;
150
 
151
     IF R.RA13'LENGTH /= 0 THEN
152
          FAILED("INCORRECT VALUE OF RA13");
153
     END IF;
154
 
155
     IF R.RA21 /= ((1,1,1), (1,1,1), (2,2,2)) THEN
156
          FAILED("INCORRECT VALUE OF RA21");
157
     END IF;
158
 
159
     IF R.RA22 /= ((2,2,2), (2,2,2), (2,2,2)) THEN
160
          FAILED("INCORRECT VALUE OF RA22");
161
     END IF;
162
 
163
     IF R.RA23 /= ((1,1,1), (2,2,2), (2,2,2)) THEN
164
          FAILED("INCORRECT VALUE OF RA23");
165
     END IF;
166
 
167
     IF R.RA24'LENGTH /= 0 OR R.RA24'LENGTH(2) /= 3 THEN
168
          FAILED("INCORRECT VALUE OF RA24");
169
     END IF;
170
 
171
     RESULT;
172
 
173
EXCEPTION
174
     WHEN OTHERS =>
175
          FAILED ("UNEXPECTED CONSTRAINT_ERROR OR OTHER EXCEPTION " &
176
                  "RAISED");
177
 
178
          RESULT;
179
END C43204E;

powered by: WebSVN 2.1.0

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