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/] [c8/] [c83022g1.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C83022G1.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 A DECLARATION IN A SUBPROGRAM FORMAL PART OR BODY
27
--     HIDES AN OUTER DECLARATION OF A HOMOGRAPH. ALSO CHECK THAT THE
28
--     OUTER DECLARATION IS DIRECTLY VISIBLE IN BOTH DECLARATIVE
29
--     REGIONS BEFORE THE DECLARATION OF THE INNER HOMOGRAPH AND THE
30
--     OUTER DECLARATION IS VISIBLE BY SELECTION AFTER THE INNER
31
--     HOMOGRAPH DECLARATION, IF THE SUBPROGRAM BODY IS COMPILED
32
--     SEPARATELY AS A SUBUNIT.
33
 
34
-- HISTORY:
35
--     BCB 08/26/88  CREATED ORIGINAL TEST.
36
 
37
SEPARATE (C83022G0M)
38
PROCEDURE INNER (X : IN OUT INTEGER) IS
39
     C : INTEGER := A;
40
     A : INTEGER := IDENT_INT(3);
41
BEGIN
42
     IF A /= IDENT_INT(3) THEN
43
          FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 1");
44
     END IF;
45
 
46
     IF C83022G0M.A /= IDENT_INT(2) THEN
47
          FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 2");
48
     END IF;
49
 
50
     IF C83022G0M.B /= IDENT_INT(2) THEN
51
          FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 3");
52
     END IF;
53
 
54
     IF C /= IDENT_INT(2) THEN
55
          FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 4");
56
     END IF;
57
 
58
     IF X /= IDENT_INT(2) THEN
59
          FAILED ("INCORRECT VALUE PASSED IN - 5");
60
     END IF;
61
 
62
     IF EQUAL(1,1) THEN
63
          X := A;
64
     ELSE
65
          X := C83022G0M.A;
66
     END IF;
67
END INNER;
68
 
69
SEPARATE (C83022G0M)
70
PROCEDURE INNER2 (X : IN INTEGER := C83022G0M.A;
71
                  A : IN OUT INTEGER) IS
72
     C : INTEGER := A;
73
BEGIN
74
     IF A /= IDENT_INT(3) THEN
75
          FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH -10");
76
     END IF;
77
 
78
     IF C83022G0M.A /= IDENT_INT(2) THEN
79
          FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 11");
80
     END IF;
81
 
82
     IF C83022G0M.B /= IDENT_INT(2) THEN
83
          FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 12");
84
     END IF;
85
 
86
     IF C /= IDENT_INT(3) THEN
87
          FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 13");
88
     END IF;
89
 
90
     IF X /= IDENT_INT(2) THEN
91
          FAILED ("INCORRECT VALUE PASSED IN - 14");
92
     END IF;
93
 
94
     IF EQUAL(1,1) THEN
95
          A := IDENT_INT(4);
96
     ELSE
97
          A := 1;
98
     END IF;
99
END INNER2;
100
 
101
SEPARATE (C83022G0M)
102
FUNCTION INNER3 (X : INTEGER) RETURN INTEGER IS
103
     C : INTEGER := A;
104
     A : INTEGER := IDENT_INT(3);
105
BEGIN
106
     IF A /= IDENT_INT(3) THEN
107
          FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 20");
108
     END IF;
109
 
110
     IF C83022G0M.A /= IDENT_INT(2) THEN
111
          FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 21");
112
     END IF;
113
 
114
     IF C83022G0M.B /= IDENT_INT(2) THEN
115
          FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 22");
116
     END IF;
117
 
118
     IF C /= IDENT_INT(2) THEN
119
          FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 23");
120
     END IF;
121
 
122
     IF X /= IDENT_INT(2) THEN
123
          FAILED ("INCORRECT VALUE PASSED IN - 24");
124
     END IF;
125
 
126
     IF EQUAL(1,1) THEN
127
          RETURN A;
128
     ELSE
129
          RETURN X;
130
     END IF;
131
END INNER3;
132
 
133
SEPARATE (C83022G0M)
134
PROCEDURE TEMPLATE (X : IN INTEGER := A;
135
                    Y : IN OUT INTEGER) IS
136
BEGIN  -- TEMPLATE
137
     IF X /= IDENT_INT(2) THEN
138
          FAILED ("INCORRECT RESULTS FOR VARIABLE - 30");
139
     END IF;
140
 
141
     IF Y /= IDENT_INT(5) THEN
142
          FAILED ("INCORRECT RESULTS FOR VARIABLE - 31");
143
     END IF;
144
 
145
     Y := IDENT_INT(2 * X);
146
 
147
     IF C83022G0M.A /= IDENT_INT(2) THEN
148
          FAILED ("INCORRECT RESULTS FOR OUTER HOMOGRAPH - " &
149
                  "32");
150
     END IF;
151
END TEMPLATE;
152
 
153
SEPARATE (C83022G0M)
154
PROCEDURE INNER5 (X : IN OUT INTEGER) IS
155
     C : INTEGER := A;
156
     A : INTEGER := IDENT_INT(3);
157
BEGIN
158
     IF A /= IDENT_INT(3) THEN
159
          FAILED ("INCORRECT VALUE FOR INNER HOMOGRAPH - 41");
160
     END IF;
161
 
162
     IF C83022G0M.A /= IDENT_INT(2) THEN
163
          FAILED ("INCORRECT VALUE FOR OUTER HOMOGRAPH - 42");
164
     END IF;
165
 
166
     IF C83022G0M.B /= IDENT_INT(2) THEN
167
          FAILED ("INCORRECT VALUE FOR OUTER VARIABLE - 43");
168
     END IF;
169
 
170
     IF C /= IDENT_INT(2) THEN
171
          FAILED ("INCORRECT VALUE FOR INNER VARIABLE - 44");
172
     END IF;
173
 
174
     IF X /= IDENT_INT(2) THEN
175
          FAILED ("INCORRECT VALUE PASSED IN - 45");
176
     END IF;
177
 
178
     IF EQUAL(1,1) THEN
179
          X := A;
180
     ELSE
181
          X := C83022G0M.A;
182
     END IF;
183
END INNER5;
184
 
185
SEPARATE (C83022G0M)
186
PROCEDURE INNER6 (X : IN OUT INTEGER; F : IN FLOAT) IS
187
BEGIN
188
     X := INTEGER(F);
189
END INNER6;

powered by: WebSVN 2.1.0

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