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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97203C.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 CONDITIONAL ENTRY CALL CAN APPEAR IN PLACES WHERE A
26
-- SELECTIVE WAIT IS NOT ALLOWED.
27
 
28
-- PART 3: TASK BODY NESTED WITHIN A TASK.
29
 
30
-- WRG 7/15/86
31
 
32
WITH REPORT; USE REPORT;
33
PROCEDURE C97203C IS
34
 
35
BEGIN
36
 
37
     TEST ("C97203C", "CHECK THAT A CONDITIONAL ENTRY CALL CAN " &
38
                      "APPEAR IN PLACES WHERE A SELECTIVE WAIT " &
39
                      "IS NOT ALLOWED; CASE: TASK BODY NESTED " &
40
                      "WITHIN A TASK");
41
 
42
     DECLARE
43
 
44
          TASK T IS
45
               ENTRY E;
46
               ENTRY SYNCH;
47
          END T;
48
 
49
          TASK BODY T IS
50
          BEGIN
51
               ACCEPT SYNCH;
52
               ACCEPT SYNCH;
53
               ACCEPT SYNCH;
54
               ACCEPT E;
55
          END T;
56
 
57
          TASK OUTER IS
58
               ENTRY E;
59
               ENTRY SYNCH;
60
          END OUTER;
61
 
62
          TASK BODY OUTER IS
63
 
64
               TASK TYPE INNER;
65
 
66
               INNER1 : INNER;
67
 
68
               TASK BODY INNER IS
69
               BEGIN
70
                    SELECT
71
                         T.E;
72
                         FAILED ("CONDITIONAL ENTRY CALL ACCEPTED - " &
73
                                 "INNER (1)");
74
                    ELSE
75
                         T.SYNCH;
76
                    END SELECT;
77
 
78
                    SELECT
79
                         OUTER.E;
80
                         FAILED ("CONDITIONAL ENTRY CALL ACCEPTED - " &
81
                                 "INNER (2)");
82
                    ELSE
83
                         OUTER.SYNCH;
84
                    END SELECT;
85
               EXCEPTION
86
                    WHEN OTHERS =>
87
                         FAILED ("EXCEPTION RAISED - INNER");
88
               END INNER;
89
 
90
               PACKAGE DUMMY IS
91
                    TYPE ACC_INNER IS ACCESS INNER;
92
                    INNER2 : ACC_INNER := NEW INNER;
93
               END DUMMY;
94
 
95
          BEGIN
96
 
97
               SELECT
98
                    T.E;
99
                    FAILED ("CONDITIONAL ENTRY CALL ACCEPTED - OUTER");
100
               ELSE
101
                    T.SYNCH;
102
               END SELECT;
103
 
104
               ACCEPT SYNCH;
105
               ACCEPT SYNCH;
106
               ACCEPT E;
107
 
108
          EXCEPTION
109
 
110
               WHEN OTHERS =>
111
                    FAILED ("EXCEPTION RAISED - OUTER");
112
 
113
          END OUTER;
114
 
115
     BEGIN
116
 
117
          T.E;
118
          OUTER.E;
119
 
120
     END;
121
 
122
     RESULT;
123
 
124
END C97203C;

powered by: WebSVN 2.1.0

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