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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 720 jeremybenn
-- C95095B.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 OVERLOADED ENTRY DECLARATIONS
26
-- ARE PERMITTED IN WHICH THERE IS A MINIMAL
27
-- DIFFERENCE BETWEEN THE DECLARATIONS.
28
 
29
--     (B) ONE ENTRY HAS ONE LESS PARAMETER THAN THE OTHER.
30
 
31
-- JWC 7/24/85
32
-- JRK 10/2/85
33
 
34
WITH REPORT; USE REPORT;
35
PROCEDURE C95095B IS
36
 
37
BEGIN
38
     TEST ("C95095B", "ENTRY OVERLOADING WITH " &
39
                      "MINIMAL DIFFERENCES");
40
 
41
     --------------------------------------------------
42
 
43
     -- ONE ENTRY HAS ONE MORE PARAMETER
44
     -- THAN THE OTHER.  THIS IS TESTED IN THE
45
     -- CASE IN WHICH THAT PARAMETER HAS A DEFAULT
46
     -- VALUE, AND THE CASE IN WHICH IT DOES NOT.
47
 
48
     DECLARE
49
          I, J : INTEGER := 0;
50
          B : BOOLEAN := TRUE;
51
          S : STRING (1..2) := "12";
52
 
53
          TASK T IS
54
               ENTRY E1 (I1, I2 : INTEGER; B1 : IN OUT BOOLEAN);
55
               ENTRY E1 (I1, I2 : INTEGER);
56
               ENTRY E2 (B1 : IN OUT BOOLEAN; I1 : INTEGER := 0);
57
               ENTRY E2 (B1 : IN OUT BOOLEAN);
58
          END T;
59
 
60
          TASK BODY T IS
61
          BEGIN
62
               LOOP
63
                    SELECT
64
                         ACCEPT E1 (I1, I2 : INTEGER;
65
                                    B1 : IN OUT BOOLEAN) DO
66
                              S (1) := 'A';
67
                         END E1;
68
                    OR
69
                         ACCEPT E1 (I1, I2 : INTEGER) DO
70
                              S (2) := 'B';
71
                         END E1;
72
                    OR
73
                         ACCEPT E2 (B1 : IN OUT BOOLEAN;
74
                                    I1 : INTEGER := 0) DO
75
                              S (1) := 'C';
76
                         END E2;
77
                    OR
78
                         ACCEPT E2 (B1 : IN OUT BOOLEAN) DO
79
                              S (2) := 'D';
80
                         END E2;
81
                    OR
82
                         TERMINATE;
83
                    END SELECT;
84
               END LOOP;
85
          END T;
86
 
87
     BEGIN
88
          T.E1 (I, J, B);
89
          T.E1 (I, J);
90
 
91
          IF S /= "AB" THEN
92
               FAILED ("ENTRIES DIFFERING ONLY IN " &
93
                       "NUMBER OF PARAMETERS (NO DEFAULTS) " &
94
                       "CAUSED CONFUSION");
95
          END IF;
96
 
97
          S := "12";
98
          T.E2 (B, I);
99
          -- NOTE THAT A CALL TO T.E2 WITH ONLY
100
          -- ONE PARAMETER IS AMBIGUOUS.
101
 
102
          IF S /= "C2" THEN
103
               FAILED ("ENTRIES DIFFERING ONLY IN " &
104
                       "EXISTENCE OF ONE PARAMETER (WITH " &
105
                       "DEFAULT) CAUSED CONFUSION");
106
          END IF;
107
     END;
108
 
109
     --------------------------------------------------
110
 
111
     RESULT;
112
END C95095B;

powered by: WebSVN 2.1.0

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