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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C85018A.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 ENTRY FAMILY MEMBER CAN BE RENAMED WITH:
26
--           1) DIFFERENT PARAMETER NAMES;
27
--           2) DIFFERENT DEFAULT VALUES;
28
--      AND THAT THE NEW NAMES/DEFAULTS ARE USED WHEN THE NEW NAME
29
--      IS USED IN A CALL.
30
 
31
-- RJW 6/3/86
32
 
33
WITH REPORT; USE REPORT;
34
 
35
PROCEDURE C85018A IS
36
 
37
BEGIN
38
 
39
     TEST( "C85018A", "CHECK THAT AN ENTRY FAMILY MEMBER CAN BE " &
40
                      "RENAMED AND THAT THE NEW NAMES/DEFAULTS ARE "  &
41
                      "THOSE ASSOCIATED WITH THE RENAMED ENTITY" );
42
 
43
     DECLARE
44
 
45
          RESULTS : INTEGER;
46
 
47
          TYPE TA IS ARRAY(1 .. 5) OF INTEGER;
48
 
49
          TASK T IS
50
               ENTRY ENT1 (BOOLEAN)
51
                    (A : INTEGER := 1; B : TA := (1 .. 5 => 1));
52
          END T;
53
 
54
          PROCEDURE ENTA (C : INTEGER := 1; D : TA := (1 .. 5 => 1))
55
                          RENAMES T.ENT1 (TRUE);
56
 
57
          PROCEDURE ENTB (B : INTEGER := 1; A : TA := (1 .. 5 => 1))
58
                          RENAMES T.ENT1 (TRUE);
59
 
60
          PROCEDURE ENTC (A : INTEGER := 2; B : TA := (1, 2, 3, 4, 5))
61
                          RENAMES T.ENT1 (TRUE);
62
 
63
          PROCEDURE ENTD (C : INTEGER := 2; D : TA := (1, 2, 3, 4, 5))
64
                          RENAMES T.ENT1 (TRUE);
65
 
66
          TASK BODY T IS
67
          BEGIN
68
               LOOP
69
                    SELECT
70
                         ACCEPT ENT1 (IDENT_BOOL (TRUE))
71
                                     (A : INTEGER := 1;
72
                                      B : TA := (1 .. 5 => 1)) DO
73
                              IF A IN 1 .. 5 THEN
74
                                   RESULTS := B(A);
75
                              ELSE
76
                                   RESULTS := 0;
77
                              END IF;
78
                         END;
79
                    OR
80
                         TERMINATE;
81
                    END SELECT;
82
               END LOOP;
83
          END T;
84
 
85
     BEGIN
86
 
87
          T.ENT1 (TRUE);
88
          IF RESULTS /= 1 THEN
89
               FAILED ( "PARAMETERS NOT PROPERLY INITIALIZED" );
90
          END IF;
91
 
92
          T.ENT1 (TRUE) (A => 6);
93
          IF RESULTS /= 0 THEN
94
               FAILED ( "INCORRECT RESULTS" );
95
          END IF;
96
 
97
          ENTA;
98
          IF RESULTS /= 1 THEN
99
               FAILED ( "CASE 1 : INCORRECT RESULTS (DEFAULT)" );
100
          END IF;
101
 
102
          ENTA(D => (5, 4, 3, 2, 1));
103
          IF RESULTS /= 5 THEN
104
               FAILED ( "CASE 1 : INCORRECT RESULTS" );
105
          END IF;
106
 
107
          ENTB;
108
          IF RESULTS /= 1 THEN
109
               FAILED ( "CASE 1 : INCORRECT RESULTS (DEFAULT)" );
110
          END IF;
111
 
112
          ENTB(A => (5, 4, 3, 2, 1), B => 2);
113
          IF RESULTS /= 4 THEN
114
               FAILED ( "CASE 1 : INCORRECT RESULTS " );
115
          END IF;
116
 
117
          ENTC;
118
          IF RESULTS /= 2 THEN
119
               FAILED ( "CASE 2 : INCORRECT RESULTS (DEFAULT)" );
120
          END IF;
121
 
122
          ENTC(3);
123
          IF RESULTS /= 3 THEN
124
               FAILED ( "CASE 2 : INCORRECT RESULTS " );
125
          END IF;
126
 
127
          ENTD;
128
          IF RESULTS /= 2 THEN
129
               FAILED ( "CASE 2 : INCORRECT RESULTS (DEFAULT)" );
130
          END IF;
131
 
132
          ENTD(4);
133
          IF RESULTS /= 4 THEN
134
               FAILED ( "CASE 2 : INCORRECT RESULTS " );
135
          END IF;
136
 
137
     END;
138
     RESULT;
139
 
140
END C85018A;

powered by: WebSVN 2.1.0

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