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/] [c7/] [c74208a.ada] - Blame information for rev 154

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C74208A.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 'SIZE AND 'ADDRESS FOR OBJECTS OF LIMITED AND
27
--     NON-LIMITED TYPES ARE AVAILABLE BOTH INSIDE AND OUTSIDE THE
28
--     PACKAGE DECLARING THE TYPES.
29
 
30
-- HISTORY:
31
--     BCB 03/14/88  CREATED ORIGINAL TEST.
32
 
33
WITH REPORT; USE REPORT;
34
WITH SYSTEM; USE SYSTEM;
35
 
36
PROCEDURE C74208A IS
37
 
38
     PACKAGE P IS
39
          TYPE T IS PRIVATE;
40
          TYPE U IS LIMITED PRIVATE;
41
     PRIVATE
42
          TYPE T IS RANGE 1 .. 100;
43
          TYPE U IS RANGE 1 .. 100;
44
     END P;
45
 
46
     A : P.T;
47
     B : P.U;
48
     ASIZE, BSIZE : INTEGER;
49
     AADDRESS, BADDRESS : ADDRESS;
50
 
51
     FUNCTION IDENT_ADR(X : ADDRESS) RETURN ADDRESS IS
52
          Y : P.T;
53
     BEGIN
54
          IF EQUAL(3,3) THEN
55
               RETURN X;
56
          END IF;
57
          RETURN Y'ADDRESS;
58
     END IDENT_ADR;
59
 
60
     PACKAGE BODY P IS
61
          X : T;
62
          Y : U;
63
          XSIZE, YSIZE : INTEGER;
64
          XADDRESS, YADDRESS : ADDRESS;
65
     BEGIN
66
          TEST ("C74208A", "CHECK THAT 'SIZE AND 'ADDRESS FOR " &
67
                           "OBJECTS OF LIMITED AND NON-LIMITED TYPES " &
68
                           "ARE AVAILABLE BOTH INSIDE AND OUTSIDE " &
69
                           "THE PACKAGE DECLARING THE TYPES");
70
 
71
          XSIZE := X'SIZE;
72
          YSIZE := Y'SIZE;
73
          XADDRESS := X'ADDRESS;
74
          YADDRESS := Y'ADDRESS;
75
 
76
          IF NOT EQUAL(XSIZE,X'SIZE) THEN
77
               FAILED ("IMPROPER VALUE FOR X'SIZE");
78
          END IF;
79
 
80
          IF XADDRESS /= IDENT_ADR(X'ADDRESS) THEN
81
               FAILED ("IMPROPER VALUE FOR X'ADDRESS");
82
          END IF;
83
 
84
          IF NOT EQUAL(YSIZE,Y'SIZE) THEN
85
               FAILED ("IMPROPER VALUE FOR Y'SIZE");
86
          END IF;
87
 
88
          IF YADDRESS /= IDENT_ADR(Y'ADDRESS) THEN
89
               FAILED ("IMPROPER VALUE FOR Y'ADDRESS");
90
          END IF;
91
     END P;
92
 
93
BEGIN
94
     ASIZE := A'SIZE;
95
     BSIZE := B'SIZE;
96
     AADDRESS := A'ADDRESS;
97
     BADDRESS := B'ADDRESS;
98
 
99
     IF NOT EQUAL(ASIZE,A'SIZE) THEN
100
          FAILED ("IMPROPER VALUE FOR A'SIZE");
101
     END IF;
102
 
103
     IF AADDRESS /= IDENT_ADR(A'ADDRESS) THEN
104
          FAILED ("IMPROPER VALUE FOR A'ADDRESS");
105
     END IF;
106
 
107
     IF NOT EQUAL(BSIZE,B'SIZE) THEN
108
          FAILED ("IMPROPER VALUE FOR B'SIZE");
109
     END IF;
110
 
111
     IF BADDRESS /= IDENT_ADR(B'ADDRESS) THEN
112
          FAILED ("IMPROPER VALUE FOR B'ADDRESS");
113
     END IF;
114
 
115
     RESULT;
116
END C74208A;

powered by: WebSVN 2.1.0

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