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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c92003a.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C92003A.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 TASK CAN BE PASSED AS AN ACTUAL IN OR IN OUT PARAMETER
26
-- IN A SUBPROGRAM CALL AND THAT THE ACTUAL AND FORMAL PARAMETERS DENOTE
27
-- THE SAME TASK OBJECT.
28
 
29
-- JRK  1/17/81
30
-- TBN 12/19/85  ADDED IN OUT PARAMETER CASE.
31
-- PWB  8/04/86  ADDED CHECK THAT FORMAL AND ACTUAL PARAMETERS DENOTE
32
--               THE SAME TASK OBJECT.
33
 
34
WITH REPORT; USE REPORT;
35
 
36
PROCEDURE C92003A IS
37
 
38
BEGIN
39
 
40
     TEST ("C92003A", "CHECK TASKS PASSED AS ACTUAL IN OR IN OUT " &
41
                       "PARAMETERS TO SUBPROGRAMS");
42
 
43
     DECLARE
44
 
45
          TASK TYPE TT IS
46
               ENTRY E (I : INTEGER);
47
          END TT;
48
 
49
          T, S : TT;
50
 
51
          TASK BODY TT IS
52
               SOURCE : INTEGER;
53
          BEGIN
54
 
55
               SELECT
56
                    ACCEPT E (I : INTEGER) DO
57
                         SOURCE := I;
58
                    END E;
59
               OR
60
                    TERMINATE;
61
               END SELECT;
62
 
63
               IF SOURCE /= 1 THEN
64
                    FAILED ("EXPECTED 1, GOT " & INTEGER'IMAGE(SOURCE));
65
               END IF;
66
 
67
               SELECT
68
                    ACCEPT E (I : INTEGER) DO
69
                         SOURCE := I;
70
                    END E;
71
               OR
72
                    TERMINATE;
73
               END SELECT;
74
 
75
               IF SOURCE /= 2 THEN
76
                    FAILED ("EXPECTED 2, GOT " & INTEGER'IMAGE(SOURCE));
77
               END IF;
78
 
79
               SELECT
80
                    ACCEPT E (I : INTEGER) DO
81
                         SOURCE := I;
82
                    END E;
83
               OR
84
                    TERMINATE;
85
               END SELECT;
86
 
87
               IF SOURCE /= 3 THEN
88
                    FAILED ("EXPECTED 3, GOT " & INTEGER'IMAGE(SOURCE));
89
               END IF;
90
 
91
          END TT;
92
 
93
          PROCEDURE P (T : TT) IS
94
          BEGIN
95
               T.E(2);
96
          END P;
97
 
98
          PROCEDURE Q (S : IN OUT TT) IS
99
          BEGIN
100
               S.E(2);
101
          END Q;
102
 
103
     BEGIN
104
 
105
          T.E(1);                  -- FIRST CALL TO T.E
106
          P(T);                    -- SECOND CALL TO T.E
107
          T.E(3);                  -- THIRD CALL TO T.E
108
 
109
          S.E(1);                  -- FIRST CALL TO S.E
110
          Q(S);                    -- SECOND CALL TO S.E
111
          S.E(3);                  -- THIRD CALL TO S.E
112
 
113
     END;
114
 
115
     RESULT;
116
 
117
END C92003A;

powered by: WebSVN 2.1.0

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