OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c95076a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C95076A.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 AN ACCEPT STATEMENT WITH AND WITHOUT A RETURN
26
-- STATEMENT RETURNS CORRECTLY.
27
 
28
-- GLH  7/11/85
29
 
30
WITH REPORT; USE REPORT;
31
 
32
PROCEDURE C95076A IS
33
 
34
     I : INTEGER;
35
 
36
     TASK T1 IS
37
          ENTRY E1 (N : IN OUT INTEGER);
38
     END T1;
39
 
40
     TASK BODY T1 IS
41
     BEGIN
42
          ACCEPT E1 (N : IN OUT INTEGER) DO
43
               IF (N = 5) THEN
44
                    N := N + 5;
45
               ELSE
46
                    N := 0;
47
               END IF;
48
          END E1;
49
     END T1;
50
 
51
     TASK T2 IS
52
          ENTRY E2 (N : IN OUT INTEGER);
53
     END T2;
54
 
55
     TASK BODY T2 IS
56
     BEGIN
57
          ACCEPT E2 (N : IN OUT INTEGER) DO
58
               IF (N = 10) THEN
59
                    N := N + 5;
60
                    RETURN;
61
               END IF;
62
               N := 0;
63
          END E2;
64
     END T2;
65
 
66
BEGIN
67
 
68
     TEST ("C95076A", "CHECK THAT AN ACCEPT STATEMENT WITH AND " &
69
                      "WITHOUT A RETURN STATEMENT RETURNS CORRECTLY");
70
 
71
     I := 5;
72
     T1.E1 (I);
73
     IF (I /= 10) THEN
74
          FAILED ("INCORRECT RENDEVOUS WITHOUT A RETURN");
75
     END IF;
76
 
77
     I := 10;
78
     T2.E2 (I);
79
     IF (I /= 15) THEN
80
          FAILED ("INCORRECT RENDEVOUS WITH A RETURN");
81
     END IF;
82
 
83
     RESULT;
84
 
85
END C95076A;

powered by: WebSVN 2.1.0

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