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/] [cd/] [cd2a91c.tst] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- CD2A91C.TST
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 SIZE SPECIFICATION FOR A TASK TYPE CAN BE GIVEN IN
27
--     THE VISIBLE OR PRIVATE PART OF A PACKAGE.
28
 
29
-- MACRO SUBSTITUTION:
30
--     $TASK_SIZE IS THE NUMBER OF BITS NEEDED BY THE IMPLEMENTATION TO
31
--     HOLD ANY POSSIBLE OBJECT OF THE TASK TYPE "BASIC_TYPE".
32
 
33
-- HISTORY:
34
--     BCB 09/08/87  CREATED ORIGINAL TEST.
35
--     RJW 05/12/89  MODIFIED CHECKS INVOLVING 'SIZE ATTRIBUTE.
36
--                   REMOVED APPLICABILTY CRITERIA.
37
--     DTN 11/20/91  DELETED SUBPARTS (B and C).
38
 
39
WITH REPORT; USE REPORT;
40
PROCEDURE CD2A91C IS
41
 
42
     BASIC_SIZE : CONSTANT := $TASK_SIZE;
43
 
44
     VAL : INTEGER := 1;
45
 
46
     TASK TYPE BASIC_TYPE IS
47
          ENTRY HERE(NUM : IN OUT INTEGER);
48
     END BASIC_TYPE;
49
 
50
     FOR BASIC_TYPE'SIZE USE BASIC_SIZE;
51
 
52
     BASIC_TASK : BASIC_TYPE;
53
 
54
     PACKAGE P IS
55
          TASK TYPE TASK_IN_P IS
56
               ENTRY HERE(NUM : IN OUT INTEGER);
57
          END TASK_IN_P;
58
          FOR TASK_IN_P'SIZE USE BASIC_SIZE;
59
          TASK TYPE ALT_TASK_IN_P IS
60
               ENTRY HERE(NUM : IN OUT INTEGER);
61
          END ALT_TASK_IN_P;
62
     PRIVATE
63
          FOR ALT_TASK_IN_P'SIZE USE BASIC_SIZE;
64
     END P;
65
 
66
     USE P;
67
 
68
     ALT_TASK : ALT_TASK_IN_P;
69
     IN_TASK : TASK_IN_P;
70
 
71
     TASK BODY BASIC_TYPE IS
72
     BEGIN
73
          SELECT
74
               ACCEPT HERE(NUM : IN OUT INTEGER) DO
75
                     NUM := 0;
76
               END HERE;
77
          OR
78
               TERMINATE;
79
          END SELECT;
80
     END BASIC_TYPE;
81
 
82
     PACKAGE BODY P IS
83
          TASK BODY TASK_IN_P IS
84
          BEGIN
85
               SELECT
86
                    ACCEPT HERE(NUM : IN OUT INTEGER) DO
87
                          NUM := 0;
88
                    END HERE;
89
               OR
90
                    TERMINATE;
91
               END SELECT;
92
          END TASK_IN_P;
93
          TASK BODY ALT_TASK_IN_P IS
94
          BEGIN
95
               SELECT
96
                    ACCEPT HERE(NUM : IN OUT INTEGER) DO
97
                          NUM := 0;
98
                    END HERE;
99
               OR
100
                    TERMINATE;
101
               END SELECT;
102
          END ALT_TASK_IN_P;
103
     END P;
104
 
105
BEGIN
106
     TEST ("CD2A91C", "CHECK THAT A SIZE SPECIFICATION FOR A TASK " &
107
                      "TYPE CAN BE GIVEN IN THE VISIBLE OR PRIVATE " &
108
                      "PART OF A PACKAGE");
109
 
110
     BASIC_TASK.HERE(VAL);
111
 
112
     IF VAL /= IDENT_INT (0) THEN
113
          FAILED ("INCORRECT RESULTS FROM ENTRY CALL - 1");
114
     END IF;
115
 
116
     VAL := 1;
117
 
118
     ALT_TASK.HERE(VAL);
119
 
120
     IF VAL /= IDENT_INT (0) THEN
121
          FAILED ("INCORRECT RESULTS FROM ENTRY CALL - 2");
122
     END IF;
123
 
124
     VAL := 1;
125
 
126
     IN_TASK.HERE(VAL);
127
 
128
     IF VAL /= IDENT_INT (0) THEN
129
          FAILED ("INCORRECT RESULTS FROM ENTRY CALL - 3");
130
     END IF;
131
 
132
 
133
     RESULT;
134
END CD2A91C;

powered by: WebSVN 2.1.0

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