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/] [ca/] [ca2002a0.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- CA2002A0M.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 SUBUNITS HAVING DIFFERENT ANCESTOR LIBRARY UNITS CAN HAVE
26
-- THE SAME NAME.
27
 
28
-- SEPARATE FILES ARE:
29
--     CA2002A0M  THE MAIN PROCEDURE, WITH SEPARATE LIBRARY 
30
--                     PACKAGES (CA2002A1) AND (CA2002A2).
31
--     CA2002A1   SUBUNIT BODIES FOR STUBS IN PACKAGE CA2002A1.
32
--     CA2002A2   SUBUNIT BODIES FOR STUBS IN PACKAGE CA2002A2.
33
 
34
-- BHS 8/02/84
35
 
36
PACKAGE CA2002A1 IS
37
 
38
     PROCEDURE PROC (X : OUT INTEGER);
39
     FUNCTION FUN RETURN BOOLEAN;
40
 
41
     PACKAGE PKG IS
42
          I : INTEGER;
43
          PROCEDURE PKG_PROC (XX : IN OUT INTEGER);
44
     END PKG;
45
 
46
END CA2002A1;
47
 
48
PACKAGE BODY CA2002A1 IS
49
 
50
     PROCEDURE PROC (X : OUT INTEGER) IS SEPARATE;
51
     FUNCTION FUN RETURN BOOLEAN IS SEPARATE;
52
     PACKAGE BODY PKG IS SEPARATE;
53
 
54
END CA2002A1;
55
 
56
 
57
PACKAGE CA2002A2 IS
58
 
59
     PROCEDURE PROC (Y : OUT INTEGER);
60
     FUNCTION FUN (Z : INTEGER := 3) RETURN BOOLEAN;
61
 
62
     PACKAGE PKG IS
63
          I : INTEGER;
64
          PROCEDURE PKG_PROC (YY : IN OUT INTEGER);
65
     END PKG;
66
 
67
END CA2002A2;
68
 
69
PACKAGE BODY CA2002A2 IS
70
 
71
     PROCEDURE PROC (Y : OUT INTEGER) IS SEPARATE;
72
     FUNCTION FUN (Z : INTEGER := 3) RETURN BOOLEAN IS SEPARATE;
73
     PACKAGE BODY PKG IS SEPARATE;
74
 
75
END CA2002A2;
76
 
77
WITH CA2002A1, CA2002A2;
78
WITH REPORT; USE REPORT;
79
PROCEDURE CA2002A0M IS
80
BEGIN
81
 
82
     TEST ("CA2002A", "SUBUNITS WITH DIFFERENT ANCESTORS " &
83
                      "CAN HAVE THE SAME NAME");
84
 
85
     DECLARE
86
          VAR1 : INTEGER;
87
          USE CA2002A1;
88
     BEGIN
89
 
90
          PROC (VAR1);
91
          IF VAR1 /= 1 THEN
92
               FAILED ("CA2002A1 PROCEDURE NOT INVOKED CORRECTLY");
93
          END IF;
94
 
95
          IF NOT FUN THEN
96
               FAILED ("CA2002A1 FUNCTION NOT INVOKED CORRECTLY");
97
          END IF;
98
 
99
          IF PKG.I /= 1 THEN
100
               FAILED ("CA2202A1 PKG VARIABLE NOT ACCESSED CORRECTLY");
101
          END IF;
102
 
103
          VAR1 := 5;
104
          PKG.PKG_PROC (VAR1);
105
          IF VAR1 /= 4 THEN
106
               FAILED ("CA2002A1 PKG SUBUNIT NOT INVOKED CORRECTLY");
107
          END IF;
108
 
109
     END;
110
 
111
     DECLARE
112
          VAR2 : INTEGER;
113
          USE CA2002A2;
114
     BEGIN
115
 
116
          PROC (VAR2);
117
          IF VAR2 /= 2 THEN
118
               FAILED ("CA2002A2 PROCEDURE NOT INVOKED CORRECTLY");
119
          END IF;
120
 
121
          IF FUN THEN
122
               FAILED ("CA2002A2 FUNCTION NOT INVOKED CORRECTLY");
123
          END IF;
124
 
125
          IF PKG.I /= 2 THEN
126
               FAILED ("CA2002A2 PKG VARIABLE NOT ACCESSED CORRECTLY");
127
          END IF;
128
 
129
          VAR2 := 3;
130
          PKG.PKG_PROC (VAR2);
131
          IF VAR2 /= 4 THEN
132
               FAILED ("CA2002A2 PKG SUBUNIT NOT INVOKED CORRECTLY");
133
          END IF;
134
 
135
     END;
136
 
137
     RESULT;
138
 
139
END CA2002A0M;

powered by: WebSVN 2.1.0

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