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/] [c85014a.ada] - Blame information for rev 316

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

Line No. Rev Author Line
1 294 jeremybenn
-- C85014A.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
-- OBJECTIVE:
26
--     CHECK THAT THE NUMBER OF FORMAL PARAMETERS IS USED TO DETERMINE
27
--     WHICH SUBPROGRAM OR ENTRY IS BEING RENAMED.
28
 
29
-- HISTORY:
30
--     JET 03/24/88  CREATED ORIGINAL TEST.
31
--     BCB 04/18/90  CORRECTED ERROR MESSAGE FOR ENTRY2.
32
 
33
WITH REPORT; USE REPORT;
34
PROCEDURE C85014A IS
35
 
36
     TASK TYPE T1 IS
37
          ENTRY ENTER (I1: IN OUT INTEGER);
38
          ENTRY STOP;
39
     END T1;
40
 
41
     TASK TYPE T2 IS
42
          ENTRY ENTER (I1, I2: IN OUT INTEGER);
43
          ENTRY STOP;
44
     END T2;
45
 
46
     TASK1 : T1;
47
     TASK2 : T2;
48
 
49
     FUNCTION F RETURN T1 IS
50
     BEGIN
51
          RETURN TASK1;
52
     END F;
53
 
54
     FUNCTION F RETURN T2 IS
55
     BEGIN
56
          RETURN TASK2;
57
     END F;
58
 
59
     PROCEDURE PROC (I1: IN OUT INTEGER) IS
60
     BEGIN
61
          I1 := I1 + 1;
62
     END PROC;
63
 
64
     PROCEDURE PROC (I1, I2: IN OUT INTEGER) IS
65
     BEGIN
66
          I1 := I1 + 2;
67
          I2 := I2 + 2;
68
     END PROC;
69
 
70
     TASK BODY T1 IS
71
          ACCEPTING_ENTRIES : BOOLEAN := TRUE;
72
     BEGIN
73
          WHILE ACCEPTING_ENTRIES LOOP
74
               SELECT
75
                    ACCEPT ENTER (I1 : IN OUT INTEGER) DO
76
                         I1 := I1 + 1;
77
                    END ENTER;
78
               OR
79
                    ACCEPT STOP DO
80
                         ACCEPTING_ENTRIES := FALSE;
81
                    END STOP;
82
               END SELECT;
83
          END LOOP;
84
     END T1;
85
 
86
     TASK BODY T2 IS
87
          ACCEPTING_ENTRIES : BOOLEAN := TRUE;
88
     BEGIN
89
          WHILE ACCEPTING_ENTRIES LOOP
90
               SELECT
91
                    ACCEPT ENTER (I1, I2 : IN OUT INTEGER) DO
92
                         I1 := I1 + 2;
93
                         I2 := I2 + 2;
94
                    END ENTER;
95
               OR
96
                    ACCEPT STOP DO
97
                         ACCEPTING_ENTRIES := FALSE;
98
                    END STOP;
99
               END SELECT;
100
          END LOOP;
101
     END T2;
102
 
103
BEGIN
104
     TEST ("C85014A", "CHECK THAT THE NUMBER OF FORMAL PARAMETERS IS " &
105
                      "USED TO DETERMINE WHICH SUBPROGRAM OR ENTRY " &
106
                      "IS BEING RENAMED");
107
 
108
     DECLARE
109
          PROCEDURE PROC1 (J1: IN OUT INTEGER) RENAMES PROC;
110
          PROCEDURE PROC2 (J1, J2: IN OUT INTEGER) RENAMES PROC;
111
 
112
          PROCEDURE ENTRY1 (J1: IN OUT INTEGER) RENAMES F.ENTER;
113
          PROCEDURE ENTRY2 (J1, J2: IN OUT INTEGER) RENAMES F.ENTER;
114
 
115
          K1, K2 : INTEGER := 0;
116
     BEGIN
117
          PROC1(K1);
118
          IF K1 /= IDENT_INT(1) THEN
119
               FAILED("INCORRECT RETURN VALUE FROM PROC1");
120
          END IF;
121
 
122
          ENTRY1(K2);
123
          IF K2 /= IDENT_INT(1) THEN
124
               FAILED("INCORRECT RETURN VALUE FROM ENTRY1");
125
          END IF;
126
 
127
          PROC2(K1, K2);
128
          IF K1 /= IDENT_INT(3) OR K2 /= IDENT_INT(3) THEN
129
               FAILED("INCORRECT RETURN VALUE FROM PROC2");
130
          END IF;
131
 
132
          ENTRY2(K1, K2);
133
          IF K1 /= IDENT_INT(5) OR K2 /= IDENT_INT(5) THEN
134
               FAILED("INCORRECT RETURN VALUE FROM ENTRY2");
135
          END IF;
136
     END;
137
 
138
     TASK1.STOP;
139
     TASK2.STOP;
140
 
141
     RESULT;
142
END C85014A;

powered by: WebSVN 2.1.0

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