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/] [c9/] [c97113a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97113A.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 ALL CONDITIONS, OPEN DELAY ALTERNATIVE EXPRESSIONS, AND
26
--   OPEN ENTRY FAMILY INDICES ARE EVALUATED (EVEN WHEN SOME (PERHAPS
27
--   ALL BUT ONE) OF THE ALTERNATIVES CAN BE RULED OUT WITHOUT
28
--   COMPLETING THE EVALUATIONS).
29
 
30
-- RM 5/06/82
31
-- SPS 11/21/82
32
-- WRG 7/9/86    ADDED DELAY EXPRESSIONS AND ENTRY FAMILY INDICES.
33
 
34
with Impdef;
35
WITH REPORT; USE REPORT;
36
PROCEDURE C97113A IS
37
 
38
     EXPR1_EVALUATED : BOOLEAN := FALSE;
39
     EXPR2_EVALUATED : BOOLEAN := FALSE;
40
     EXPR3_EVALUATED : BOOLEAN := FALSE;
41
 
42
     FUNCTION F1 RETURN BOOLEAN IS
43
     BEGIN
44
          EXPR1_EVALUATED := TRUE;
45
          RETURN TRUE;
46
     END F1;
47
 
48
     FUNCTION F2 (X : INTEGER) RETURN INTEGER IS
49
     BEGIN
50
          EXPR2_EVALUATED := TRUE;
51
          RETURN X;
52
     END F2;
53
 
54
     FUNCTION F3 (X : DURATION) RETURN DURATION IS
55
     BEGIN
56
          EXPR3_EVALUATED := TRUE;
57
          RETURN X;
58
     END F3;
59
 
60
BEGIN
61
 
62
     TEST ("C97113A", "CHECK THAT ALL CONDITIONS, OPEN DELAY " &
63
                      "ALTERNATIVE EXPRESSIONS, AND OPEN ENTRY " &
64
                      "FAMILY INDICES ARE EVALUATED");
65
 
66
     DECLARE
67
 
68
          TASK T IS
69
               ENTRY E1;
70
               ENTRY E2;
71
               ENTRY E3 (1..1);
72
          END T;
73
 
74
          TASK BODY T IS
75
          BEGIN
76
               --ENSURE THAT E1 HAS BEEN CALLED BEFORE PROCEEDING:
77
               WHILE E1'COUNT = 0 LOOP
78
                    DELAY 1.0 * Impdef.One_Second;
79
               END LOOP;
80
 
81
               SELECT
82
                    ACCEPT E1;
83
               OR
84
                    WHEN F1 =>
85
                         ACCEPT E2;
86
               OR
87
                    ACCEPT E3 ( F2(1) );
88
               OR
89
                    DELAY F3 ( 1.0 ) * Impdef.One_Second;
90
               END SELECT;
91
          END T;
92
 
93
     BEGIN
94
 
95
          T.E1;
96
 
97
     END;
98
 
99
     IF NOT EXPR1_EVALUATED THEN
100
          FAILED ("GUARD NOT EVALUATED");
101
     END IF;
102
 
103
     IF NOT EXPR2_EVALUATED THEN
104
          FAILED ("ENTRY FAMILY INDEX NOT EVALUATED");
105
     END IF;
106
 
107
     IF NOT EXPR3_EVALUATED THEN
108
          FAILED ("OPEN DELAY ALTERNATIVE EXPRESSION NOT EVALUATED");
109
     END IF;
110
 
111
     RESULT;
112
 
113
END C97113A;

powered by: WebSVN 2.1.0

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