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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c38102a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C38102A.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 AN INCOMPLETE TYPE DECLARATION CAN BE GIVEN FOR ANY TYPE.
26
-- FULL DECLARATIONS FOR INTEGER, ENUMERATION, CONSTRAINED AND
27
-- UNCONSTRAINED ARRAYS, RECORDS WITHOUT DISCRIMINANTS,
28
-- AN ACCESS TYPE, OR TYPES DERIVED FROM ANY OF THE ABOVE.
29
 
30
-- (FLOAT, FIXED, TASKS AND RECORDS WITH DISCRIMINANTS ARE CHECKED
31
-- IN OTHER TESTS).
32
 
33
-- DAT 3/24/81
34
-- SPS 10/25/82
35
-- SPS 2/17/82
36
 
37
WITH REPORT; USE REPORT;
38
 
39
PROCEDURE C38102A IS
40
BEGIN
41
     TEST ("C38102A", "ANY TYPE MAY BE INCOMPLETE");
42
 
43
     DECLARE
44
 
45
          TYPE X1;
46
          TYPE X2;
47
          TYPE X3;
48
          TYPE X4;
49
          TYPE X5;
50
          TYPE X6;
51
          TYPE X7;
52
          TYPE X8;
53
 
54
          TYPE D1;
55
          TYPE D2;
56
          TYPE D3;
57
          TYPE D4;
58
          TYPE D5;
59
          TYPE D6;
60
 
61
          TYPE X1 IS RANGE 1 .. 10;
62
          TYPE X2 IS (TRUE, FALSE, MAYBE, GREEN);
63
          TYPE X3 IS ARRAY (1 .. 3) OF STRING (1..10);
64
          TYPE X4 IS ARRAY (NATURAL RANGE <> ) OF X3;
65
          TYPE AR1 IS ARRAY (X2) OF X3;
66
          TYPE X5 IS RECORD
67
               C1 : X4 (1..3);
68
               C2 : AR1;
69
          END RECORD;
70
          TYPE X6 IS ACCESS X8;
71
          TYPE X7 IS ACCESS X6;
72
          TYPE X8 IS ACCESS X6;
73
 
74
          TYPE D1 IS NEW X1;
75
          TYPE D2 IS NEW X2;
76
          TYPE D3 IS NEW X3;
77
          TYPE D4 IS NEW X4;
78
          TYPE D5 IS NEW X5;
79
          SUBTYPE D7 IS X7;
80
          SUBTYPE D8 IS X8;
81
          TYPE D6 IS ACCESS D8;
82
 
83
          PACKAGE P IS
84
 
85
               TYPE X1;
86
               TYPE X2;
87
               TYPE X3;
88
               TYPE X4;
89
               TYPE X5;
90
               TYPE X6;
91
               TYPE X7 IS PRIVATE;
92
               TYPE X8 IS LIMITED PRIVATE;
93
 
94
               TYPE D1;
95
               TYPE D2;
96
               TYPE D3;
97
               TYPE D4;
98
               TYPE D5;
99
               TYPE D6;
100
 
101
               TYPE X1 IS RANGE 1 .. 10;
102
               TYPE X2 IS (TRUE, FALSE, MAYBE, GREEN);
103
               TYPE X3 IS ARRAY (1 .. 3) OF STRING (1..10);
104
               TYPE X4 IS ARRAY (NATURAL RANGE <> ) OF X3;
105
               TYPE AR1 IS ARRAY (X2) OF X3;
106
               TYPE X5 IS RECORD
107
                    C1 : X4 (1..3);
108
                    C2 : AR1;
109
               END RECORD;
110
               TYPE X6 IS ACCESS X8;
111
 
112
               TYPE D1 IS RANGE 1 .. 10;
113
               TYPE D2 IS NEW X2;
114
               TYPE D3 IS NEW X3;
115
               TYPE D4 IS NEW X4;
116
               TYPE D5 IS NEW X5;
117
               TYPE D6 IS NEW X6;
118
               SUBTYPE D7 IS X7;
119
               SUBTYPE D8 IS X8;
120
               TYPE D9 IS ACCESS D8;
121
 
122
               VX7 : CONSTANT X7;
123
 
124
          PRIVATE
125
 
126
               TYPE X7 IS RECORD
127
                    C1 : X1;
128
                    C3 : X3;
129
                    C5 : X5;
130
                    C6 : X6;
131
                    C8 : D9;
132
               END RECORD;
133
 
134
               V3 : X3 := (X3'RANGE => "ABCDEFGHIJ");
135
               TYPE A7 IS ACCESS X7;
136
               TYPE X8 IS ARRAY (V3'RANGE) OF A7;
137
 
138
               VX7 : CONSTANT X7 := (3, V3, ((1..3=>V3),
139
                    (TRUE..GREEN=>V3)), NULL,
140
                    NEW D8);
141
          END P;
142
          USE P;
143
 
144
          VD7: P.D7;
145
 
146
          PACKAGE BODY P IS
147
          BEGIN
148
               VD7 := D7(VX7);
149
          END P;
150
 
151
     BEGIN
152
          IF VX7 /= P.X7(VD7) THEN
153
               FAILED ("WRONG VALUE SOMEWHERE");
154
          END IF;
155
     END;
156
 
157
     RESULT;
158
END C38102A;

powered by: WebSVN 2.1.0

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