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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C95095D.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 SUBPROGRAM AND ENTRY DECLARATIONS
26
-- ARE PERMITTED IN WHICH THERE IS A MINIMAL
27
-- DIFFERENCE BETWEEN THE DECLARATIONS.
28
 
29
--     (D) A SUBPROGRAM IS DECLARED IN AN OUTER DECLARATIVE
30
--         PART, AN ENTRY IS DECLARED IN A TASK, AND THE
31
--         PARAMETERS ARE ORDERED DIFFERENTLY.
32
 
33
-- JWC 7/24/85
34
-- JRK 10/2/85
35
-- PWN 09/11/94  REMOVED PRAGMA PRIORITY FOR ADA 9X.
36
 
37
with Impdef;
38
WITH REPORT; USE REPORT;
39
WITH SYSTEM; USE SYSTEM;
40
PROCEDURE C95095D IS
41
 
42
 
43
BEGIN
44
     TEST ("C95095D", "SUBPROGRAM/ENTRY OVERLOADING WITH " &
45
                      "MINIMAL DIFFERENCES");
46
 
47
     --------------------------------------------------
48
 
49
     -- A SUBPROGRAM IS DECLARED IN AN OUTER DECLARATIVE
50
     -- PART, AN ENTRY IS DECLARED IN A TASK, AND THE
51
     -- PARAMETERS ARE ORDERED DIFFERENTLY.
52
 
53
     DECLARE
54
          S : STRING (1..2) := "12";
55
 
56
          I : INTEGER := 0;
57
 
58
          PROCEDURE E (I1 : INTEGER; I2 : IN OUT INTEGER;
59
                       B1 : BOOLEAN) IS
60
          BEGIN
61
               S (1) := 'A';
62
          END E;
63
 
64
          TASK T IS
65
               ENTRY E (B1 : BOOLEAN; I1 : INTEGER;
66
                        I2 : IN OUT INTEGER);
67
          END T;
68
 
69
          TASK BODY T IS
70
          BEGIN
71
               E (5, I, TRUE);          -- PROCEDURE CALL.
72
               ACCEPT E (B1 : BOOLEAN; I1 : INTEGER;
73
                         I2 : IN OUT INTEGER) DO
74
                    S (2) := 'B';
75
               END E;
76
               E (TRUE, 5, I);          -- ENTRY CALL; SELF-BLOCKING.
77
               -- NOTE THAT A CALL IN WHICH ALL ACTUAL PARAMETERS
78
               -- ARE NAMED_ASSOCIATIONS IS AMBIGUOUS.
79
               FAILED ("TASK DID NOT BLOCK ITSELF");
80
          END T;
81
 
82
     BEGIN
83
 
84
          T.E (TRUE, 5, I);
85
 
86
          DELAY 10.0 * Impdef.One_Second;
87
          ABORT T;
88
 
89
          IF S /= "AB" THEN
90
               FAILED ("PROCEDURES/ENTRIES " &
91
                       "DIFFERING ONLY IN PARAMETER " &
92
                       "TYPE ORDER CAUSED CONFUSION");
93
          END IF;
94
     END;
95
 
96
     --------------------------------------------------
97
 
98
     RESULT;
99
END C95095D;

powered by: WebSVN 2.1.0

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