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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c6/] [c64201b.ada] - Blame information for rev 720

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C64201B.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 INITALIZATION OF IN PARAMETERS OF A TASK
26
-- TYPE IS PERMITTED.
27
-- (SEE ALSO 7.4.4/T2 FOR TESTS OF LIMITED PRIVATE TYPES.)
28
 
29
-- CVP 5/14/81
30
-- ABW 7/1/82
31
-- BHS 7/9/84
32
 
33
WITH REPORT;
34
PROCEDURE C64201B IS
35
 
36
     USE REPORT;
37
 
38
BEGIN
39
 
40
     TEST( "C64201B" , "CHECK THAT INITIALIZATION OF IN PARAMETERS " &
41
                       "OF A TASK TYPE IS PERMITTED" );
42
 
43
     DECLARE
44
 
45
          GLOBAL : INTEGER := 10;
46
 
47
          TASK TYPE T_TYPE IS
48
               ENTRY E (X : IN OUT INTEGER);
49
          END;
50
 
51
          TSK1, TSK2 : T_TYPE;
52
 
53
          TASK BODY T_TYPE IS
54
          BEGIN
55
               ACCEPT E (X : IN OUT INTEGER) DO
56
                    X := X - 1;
57
               END E;
58
               ACCEPT E (X : IN OUT INTEGER) DO
59
                    X := X + 1;
60
               END E;
61
          END T_TYPE;
62
 
63
 
64
          PROCEDURE PROC1 (T : T_TYPE := TSK1) IS
65
          BEGIN
66
               T.E (X => GLOBAL);
67
          END PROC1;
68
 
69
          PROCEDURE PROC2 (T : T_TYPE := TSK1) IS
70
          BEGIN
71
               T.E (X => GLOBAL);
72
               IF (GLOBAL /= IDENT_INT(8)) THEN
73
                    FAILED( "TASK NOT PASSED IN PROC1, " &
74
                            "DEFAULT TSK1 EMPLOYED" );
75
               END IF;
76
          END PROC2;
77
 
78
          PROCEDURE TERM (T : T_TYPE; NUM : CHARACTER) IS
79
          BEGIN
80
               IF NOT T'TERMINATED THEN
81
                    ABORT T;
82
                    COMMENT ("ABORTING TASK " & NUM);
83
               END IF;
84
          END TERM;
85
 
86
     BEGIN
87
 
88
          PROC1(TSK2);
89
          IF GLOBAL /= 9 THEN
90
               FAILED ("INCORRECT GLOBAL VALUE AFTER PROC1");
91
          ELSE
92
               PROC2;
93
          END IF;
94
 
95
          TERM(TSK1, '1');
96
          TERM(TSK2, '2');
97
     END;
98
 
99
     RESULT;
100
 
101
END C64201B;

powered by: WebSVN 2.1.0

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