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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c5/] [c59002c.ada] - Blame information for rev 750

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C59002C.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 JUMPS OUT OF SELECT STATEMENTS (OTHER THAN
26
--    FROM INSIDE  ACCEPT  BODIES IN SELECT_ALTERNATIVES)
27
--    ARE POSSIBLE AND ARE CORRECTLY PERFORMED.
28
 
29
-- THIS TEST CONTAINS SHARED VARIABLES.
30
 
31
 
32
-- RM 08/15/82
33
-- SPS 12/13/82
34
-- PWN 11/30/94 REMOVED PRAGMA PRIORITY INSTANCES FOR ADA 9X.
35
 
36
with Impdef;
37
WITH REPORT;
38
WITH SYSTEM;
39
USE SYSTEM;
40
PROCEDURE  C59002C  IS
41
 
42
     USE  REPORT ;
43
 
44
     FLOW_STRING : STRING(1..2) := "XX" ;
45
     INDEX       : INTEGER      :=  1 ;
46
 
47
 
48
BEGIN
49
 
50
     TEST( "C59002C" , "CHECK THAT ONE CAN JUMP OUT OF SELECT STATE" &
51
                       "MENTS" );
52
 
53
     -------------------------------------------------------------------
54
 
55
     DECLARE
56
 
57
          TASK  T  IS
58
 
59
 
60
               ENTRY  E1 ;
61
               ENTRY  E2 ;
62
          END  T ;
63
 
64
          TASK BODY T IS
65
          BEGIN
66
 
67
               WHILE  E2'COUNT <= 0  LOOP
68
                    DELAY 1.0 * Impdef.One_Second;
69
               END LOOP;
70
 
71
               SELECT
72
                    ACCEPT  E1  DO
73
                         FAILED( " E1  ACCEPTED; NO ENTRY CALL (1)" );
74
                    END ;
75
               OR
76
                    ACCEPT  E2 ;
77
                    GOTO  L123 ;
78
                    FAILED( "'GOTO' NOT OBEYED (1)" );
79
               OR
80
                    DELAY 10.0 * Impdef.One_Second;
81
                    FAILED( "DELAY ALTERNATIVE SELECTED (1)" );
82
               END SELECT;
83
 
84
               FAILED( "WRONG DESTINATION FOR 'GOTO' (1)" );
85
 
86
               << L123 >>
87
 
88
               FLOW_STRING(INDEX) := 'A' ;
89
               INDEX              := INDEX + 1 ;
90
 
91
          END T;
92
 
93
     BEGIN
94
 
95
          T.E2 ;
96
 
97
     END;
98
 
99
     -------------------------------------------------------------------
100
 
101
     DECLARE
102
 
103
          TASK  T  IS
104
               ENTRY  E1 ;
105
               ENTRY  E2 ;
106
          END  T ;
107
 
108
          TASK BODY T IS
109
          BEGIN
110
 
111
               SELECT
112
                    ACCEPT  E1  DO
113
                         FAILED( " E1  ACCEPTED; NO ENTRY CALL (2)" );
114
                    END ;
115
               OR
116
                    ACCEPT  E2  DO
117
                         FAILED( " E2  ACCEPTED; NO ENTRY CALL (2)" );
118
                    END ;
119
               OR
120
                    DELAY 10.0 * Impdef.One_Second;
121
                    GOTO  L321 ;
122
                    FAILED( "'GOTO' NOT OBEYED (2)" );
123
               END SELECT;
124
 
125
               FAILED( "WRONG DESTINATION FOR 'GOTO' (2)" );
126
 
127
               << L321 >>
128
 
129
               FLOW_STRING(INDEX) := 'B' ;
130
               INDEX              := INDEX + 1 ;
131
 
132
          END T;
133
 
134
     BEGIN
135
 
136
          NULL ;
137
 
138
     END;
139
 
140
     -------------------------------------------------------------------
141
 
142
     IF  FLOW_STRING /= "AB"  THEN
143
          FAILED("WRONG FLOW OF CONTROL" );
144
     END IF;
145
 
146
 
147
     RESULT ;
148
 
149
 
150
END  C59002C ;

powered by: WebSVN 2.1.0

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