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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [a/] [ad7203b.ada] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
-- AD7203B.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 THE PREFIX OF THE 'SIZE' ATTRIBUTE CAN BE AN OBJECT,
27
--     A TYPE, OR A SUBTYPE.
28
 
29
-- HISTORY:
30
--     BCB  09/27/88  CREATED ORIGINAL TEST BY MODIFYING AND RENAMING
31
--                    CD7203B.ADA.
32
 
33
WITH SYSTEM;
34
WITH REPORT; USE REPORT;
35
PROCEDURE AD7203B IS
36
 
37
     TYPE I_REC IS
38
          RECORD
39
               I1, I2 : INTEGER;
40
          END RECORD;
41
 
42
     I   : INTEGER;
43
     I_A : ARRAY (1 ..5) OF INTEGER;
44
     I_R : I_REC;
45
 
46
     I_SIZE : INTEGER := I'SIZE;
47
     I_A_SIZE : INTEGER := I_A'SIZE;
48
     I_R_SIZE : INTEGER := I_R'SIZE;
49
     I_A_1_SIZE : INTEGER := I_A(1)'SIZE;
50
     I_R_I1_SIZE : INTEGER := I_R.I1'SIZE;
51
 
52
     TYPE FIXED IS DELTA 0.01 RANGE -1.0 .. 1.0;
53
     TYPE FXD_REC IS
54
          RECORD
55
               FXD1, FXD2 : FIXED;
56
          END RECORD;
57
 
58
     FXD   : FIXED;
59
     FXD_A : ARRAY (1 .. 5) OF FIXED;
60
     FXD_R : FXD_REC;
61
 
62
     FXD_SIZE : INTEGER := FXD'SIZE;
63
     FXD_A_SIZE : INTEGER := FXD_A'SIZE;
64
     FXD_R_SIZE : INTEGER := FXD_R'SIZE;
65
     FXD_A_1_SIZE : INTEGER := FXD_A(1)'SIZE;
66
     FXD_R_FXD1_SIZE : INTEGER := FXD_R.FXD1'SIZE;
67
 
68
     TYPE FLT_REC IS
69
          RECORD
70
               FLT1, FLT2 : FLOAT;
71
          END RECORD;
72
 
73
     FLT   : FLOAT;
74
     FLT_A : ARRAY (1 .. 5) OF FLOAT;
75
     FLT_R : FLT_REC;
76
 
77
     FLT_SIZE : INTEGER := FLT'SIZE;
78
     FLT_A_SIZE : INTEGER := FLT_A'SIZE;
79
     FLT_R_SIZE : INTEGER := FLT_R'SIZE;
80
     FLT_A_1_SIZE : INTEGER := FLT_A(1)'SIZE;
81
     FLT_R_FLT1_SIZE : INTEGER := FLT_R.FLT1'SIZE;
82
 
83
     SUBTYPE TINY_INT IS INTEGER RANGE 0 .. 255;
84
     TYPE TI_REC IS
85
          RECORD
86
               TI1, TI2 : TINY_INT;
87
          END RECORD;
88
 
89
     TI   : TINY_INT;
90
     TI_A : ARRAY (1 .. 5) OF TINY_INT;
91
     TI_R : TI_REC;
92
 
93
     TINY_INT_SIZE : INTEGER := TINY_INT'SIZE;
94
     TI_SIZE : INTEGER := TI'SIZE;
95
     TI_A_SIZE : INTEGER := TI_A'SIZE;
96
     TI_R_SIZE : INTEGER := TI_R'SIZE;
97
     TI_A_1_SIZE : INTEGER := TI_A(1)'SIZE;
98
     TI_R_TI1_SIZE : INTEGER := TI_R.TI1'SIZE;
99
 
100
     TYPE STR IS ARRAY (TINY_INT RANGE <>) OF CHARACTER;
101
     TYPE STR_2 IS ARRAY (1 .. 127) OF CHARACTER;
102
     TYPE STR_REC IS
103
          RECORD
104
               S1, S2 : STR (TINY_INT'FIRST .. TINY_INT'LAST);
105
          END RECORD;
106
 
107
     S   : STR (TINY_INT'FIRST .. TINY_INT'LAST);
108
     S_A : ARRAY (1 .. 5) OF STR (TINY_INT'FIRST .. TINY_INT'LAST);
109
     S_R : STR_REC;
110
 
111
     STR_2_SIZE : INTEGER := STR_2'SIZE;
112
     S_SIZE : INTEGER := S'SIZE;
113
     S_A_SIZE : INTEGER := S_A'SIZE;
114
     S_R_SIZE : INTEGER := S_R'SIZE;
115
     S_A_1_SIZE : INTEGER := S_A(1)'SIZE;
116
     S_R_S1_SIZE : INTEGER := S_R.S1'SIZE;
117
 
118
     TYPE C_REC IS
119
          RECORD
120
               C1, C2 : CHARACTER;
121
          END RECORD;
122
 
123
     C   : CHARACTER;
124
     C_A : ARRAY (1 .. 5) OF CHARACTER;
125
     C_R : C_REC;
126
 
127
     C_SIZE : INTEGER := C'SIZE;
128
     C_A_SIZE : INTEGER := C_A'SIZE;
129
     C_R_SIZE : INTEGER := C_R'SIZE;
130
     C_A_1_SIZE : INTEGER := C_A(1)'SIZE;
131
     C_R_C1_SIZE : INTEGER := C_R.C1'SIZE;
132
 
133
     TYPE B_REC IS
134
          RECORD
135
               B1, B2 : BOOLEAN;
136
          END RECORD;
137
 
138
     B   : BOOLEAN;
139
     B_A : ARRAY (1 .. 5) OF BOOLEAN;
140
     B_R : B_REC;
141
 
142
     B_SIZE : INTEGER := B'SIZE;
143
     B_A_SIZE : INTEGER := B_A'SIZE;
144
     B_R_SIZE : INTEGER := B_R'SIZE;
145
     B_A_1_SIZE : INTEGER := B_A(1)'SIZE;
146
     B_R_B1_SIZE : INTEGER := B_R.B1'SIZE;
147
 
148
     TYPE DISCR IS RANGE 1 .. 2;
149
     TYPE DISCR_REC (D : DISCR := 1) IS
150
          RECORD
151
               CASE D IS
152
                    WHEN 1 =>
153
                         C1_I : INTEGER;
154
                    WHEN 2 =>
155
                         C2_I1 : INTEGER;
156
                         C2_I2 : INTEGER;
157
               END CASE;
158
          END RECORD;
159
 
160
     DR_UC : DISCR_REC;
161
     DR_C  : DISCR_REC (2);
162
     DR_A  : ARRAY (1 .. 5) OF DISCR_REC;
163
 
164
     DR_UC_SIZE : INTEGER := DR_UC'SIZE;
165
     DR_C_SIZE : INTEGER := DR_C'SIZE;
166
     DR_A_SIZE : INTEGER := DR_A'SIZE;
167
     DR_UC_C1_I_SIZE : INTEGER := DR_UC.C1_I'SIZE;
168
     DR_A_1_SIZE : INTEGER := DR_A(1)'SIZE;
169
 
170
     TYPE ENUM IS (E1, E2, E3, E4);
171
     TYPE ENUM_REC IS
172
          RECORD
173
               E1, E2 : ENUM;
174
          END RECORD;
175
 
176
     E   : ENUM;
177
     E_A : ARRAY (1 .. 5) OF ENUM;
178
     E_R : ENUM_REC;
179
 
180
     E_SIZE : INTEGER := E'SIZE;
181
     E_A_SIZE : INTEGER := E_A'SIZE;
182
     E_R_SIZE : INTEGER := E_R'SIZE;
183
     E_A_1_SIZE : INTEGER := E_A(1)'SIZE;
184
     E_R_E1_SIZE : INTEGER := E_R.E1'SIZE;
185
 
186
     TASK TYPE TSK IS END TSK;
187
     TYPE TSK_REC IS
188
          RECORD
189
               TSK1, TSK2 : TSK;
190
          END RECORD;
191
 
192
     T   : TSK;
193
     T_A : ARRAY (1 .. 5) OF TSK;
194
     T_R : TSK_REC;
195
 
196
     T_SIZE : INTEGER := T'SIZE;
197
     T_A_SIZE : INTEGER := T_A'SIZE;
198
     T_R_SIZE : INTEGER := T_R'SIZE;
199
     T_A_1_SIZE : INTEGER := T_A(1)'SIZE;
200
     T_R_TSK1_SIZE : INTEGER := T_R.TSK1'SIZE;
201
 
202
     TYPE ACC IS ACCESS INTEGER;
203
     TYPE ACC_REC IS
204
          RECORD
205
               A1, A2 : ACC;
206
          END RECORD;
207
 
208
     A   : ACC;
209
     A_A : ARRAY (1 .. 5) OF ACC;
210
     A_R : ACC_REC;
211
 
212
     A_SIZE : INTEGER := A'SIZE;
213
     A_A_SIZE : INTEGER := A_A'SIZE;
214
     A_R_SIZE : INTEGER := A_R'SIZE;
215
     A_A_1_SIZE : INTEGER := A_A(1)'SIZE;
216
     A_R_A1_SIZE : INTEGER := A_R.A1'SIZE;
217
 
218
     PACKAGE PK IS
219
          TYPE PRV IS PRIVATE;
220
          TYPE PRV_REC IS
221
               RECORD
222
                    P1, P2 : PRV;
223
               END  RECORD;
224
 
225
          TYPE LPRV IS LIMITED PRIVATE;
226
          TYPE LPRV_REC IS
227
               RECORD
228
                    LP1, LP2 : LPRV;
229
               END RECORD;
230
     PRIVATE
231
          TYPE PRV IS NEW INTEGER;
232
 
233
          TYPE LPRV IS NEW INTEGER;
234
     END PK;
235
     USE PK;
236
 
237
     P   : PRV;
238
     P_A : ARRAY (1 .. 5) OF PRV;
239
     P_R : PRV_REC;
240
 
241
     P_SIZE : INTEGER := P'SIZE;
242
     P_A_SIZE : INTEGER := P_A'SIZE;
243
     P_R_SIZE : INTEGER := P_R'SIZE;
244
     P_A_1_SIZE : INTEGER := P_A(1)'SIZE;
245
     P_R_P1_SIZE : INTEGER := P_R.P1'SIZE;
246
 
247
     LP   : LPRV;
248
     LP_A : ARRAY (1 .. 5) OF LPRV;
249
     LP_R : LPRV_REC;
250
 
251
     LP_SIZE : INTEGER := LP'SIZE;
252
     LP_A_SIZE : INTEGER := LP_A'SIZE;
253
     LP_R_SIZE : INTEGER := LP_R'SIZE;
254
     LP_A_1_SIZE : INTEGER := LP_A(1)'SIZE;
255
     LP_R_LP1_SIZE : INTEGER := LP_R.LP1'SIZE;
256
 
257
     TASK BODY TSK IS
258
     BEGIN
259
          NULL;
260
     END TSK;
261
 
262
BEGIN
263
     TEST ("AD7203B", "CHECK THAT THE PREFIX OF THE 'SIZE' ATTRIBUTE " &
264
                      "CAN BE AN OBJECT, A TYPE, OR A SUBTYPE");
265
 
266
     RESULT;
267
END AD7203B;

powered by: WebSVN 2.1.0

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