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/] [ca/] [ca2009d.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
-- CA2009D.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 A GENERIC SUBPROGRAM SUBUNIT CAN BE SPECIFIED AND
26
-- INSTANTIATED.
27
 
28
-- BHS 8/01/84
29
-- JRK 5/24/85  CHANGED TO .ADA, SEE AI-00323.
30
 
31
 
32
WITH REPORT;
33
USE REPORT;
34
PROCEDURE CA2009D IS
35
 
36
     INT1 : INTEGER := 1;
37
     INT2 : INTEGER := 2;
38
 
39
 
40
     GENERIC
41
          TYPE ELEM IS PRIVATE;
42
          PCON1 : IN ELEM;
43
          PVAR1 : IN OUT ELEM;
44
     PROCEDURE PROC1;
45
 
46
 
47
     GENERIC
48
          TYPE OBJ IS PRIVATE;
49
          FCON1 : IN OBJ;
50
          FVAR1 : IN OUT OBJ;
51
     FUNCTION FUNC1 RETURN OBJ;
52
 
53
 
54
     PROCEDURE PROC1 IS SEPARATE;
55
     FUNCTION FUNC1 RETURN OBJ IS SEPARATE;
56
 
57
 
58
     PROCEDURE NI_PROC1 IS NEW PROC1 (INTEGER, 2, INT1);
59
     FUNCTION NI_FUNC1 IS NEW FUNC1 (INTEGER, 3, INT2);
60
 
61
 
62
BEGIN
63
 
64
     TEST ("CA2009D", "SPECIFICATION AND INSTANTIATION " &
65
                      "OF GENERIC SUBPROGRAM SUBUNITS");
66
 
67
     NI_PROC1;
68
     IF INT1 /= 2 THEN
69
          FAILED ("INCORRECT INSTANTIATION - NI_PROC1");
70
     END IF;
71
 
72
 
73
     IF NI_FUNC1 /= 3 THEN
74
          FAILED ("INCORRECT INSTANTIATION - NI_FUNC1");
75
     END IF;
76
 
77
 
78
     RESULT;
79
 
80
END CA2009D;
81
 
82
 
83
SEPARATE (CA2009D)
84
PROCEDURE PROC1 IS
85
BEGIN
86
     PVAR1 := PCON1;
87
END PROC1;
88
 
89
 
90
SEPARATE (CA2009D)
91
FUNCTION FUNC1 RETURN OBJ IS
92
BEGIN
93
     FVAR1 := FCON1;
94
     RETURN FVAR1;
95
END FUNC1;

powered by: WebSVN 2.1.0

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