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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C41306A.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 IF  F  IS A FUNCTION RETURNING A TASK OF A TYPE HAVING
26
--     AN ENTRY  E ,  AN ENTRY CALL OF THE FORM
27
--
28
--                           F.E
29
--
30
--     IS PERMITTED.
31
 
32
 
33
-- RM  2/2/82
34
-- ABW 7/16/82
35
 
36
WITH REPORT;
37
USE REPORT;
38
PROCEDURE C41306A IS
39
 
40
 
41
BEGIN
42
 
43
     TEST ( "C41306A" , "CHECK THAT IF  F  IS A FUNCTION RETURNING" &
44
                        " A TASK OF A TYPE HAVING AN ENTRY  E ,  AN" &
45
                        " ENTRY CALL OF THE FORM  F.E  IS PERMITTED");
46
 
47
 
48
     -------------------------------------------------------------------
49
 
50
     DECLARE
51
 
52
          X  : INTEGER  :=  0 ;
53
 
54
          TASK TYPE  T  IS
55
               ENTRY  E ;
56
          END  T ;
57
 
58
          T1 : T ;
59
 
60
          TASK BODY  T  IS
61
          BEGIN
62
               ACCEPT  E  DO
63
                    X := IDENT_INT(17) ;
64
               END  E ;
65
               ACCEPT  E  DO
66
                    X := IDENT_INT(16) ;
67
               END  E ;
68
          END  T ;
69
 
70
          FUNCTION  F1  RETURN  T  IS
71
          BEGIN
72
               RETURN  T1 ;
73
          END  F1 ;
74
 
75
          FUNCTION F2 (A,B : BOOLEAN) RETURN T IS
76
          BEGIN
77
               IF A AND B THEN NULL; END IF;
78
               RETURN T1;
79
          END F2;
80
 
81
     BEGIN
82
 
83
          F1.E ;                                  -- X SET TO 17.
84
 
85
          IF  X /= 17 THEN
86
               FAILED("WRONG VALUE FOR GLOBAL VARIABLE - 1");
87
          END IF;
88
 
89
          X := 0;
90
          F2(TRUE,TRUE).E;                        -- X SET TO 16.
91
                            -- X TO BE SET TO 16.
92
 
93
          IF X /= 16 THEN
94
               FAILED("WRONG VALUE FOR GLOBAL VARIABLE - 2");
95
          END IF;
96
 
97
     END ;
98
 
99
     -------------------------------------------------------------------
100
 
101
     RESULT;
102
 
103
 
104
END C41306A;

powered by: WebSVN 2.1.0

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