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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C66002E.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 DECLARATIONS
26
-- ARE PERMITTED IN WHICH THERE IS A MINIMAL
27
-- DIFFERENCE BETWEEN THE DECLARATIONS.
28
 
29
--     (E) ONE SUBPROGRAM IS DECLARED IN AN OUTER DECLARATIVE
30
--         PART, THE OTHER IN AN INNER PART, AND THE PARAMETERS ARE 
31
--         ORDERED DIFFERENTLY.
32
 
33
-- CVP 5/4/81
34
-- JRK 5/8/81
35
-- NL 10/13/81
36
 
37
WITH REPORT;
38
PROCEDURE C66002E IS
39
 
40
     USE REPORT;
41
 
42
BEGIN
43
     TEST ("C66002E", "SUBPROGRAM OVERLOADING WITH " &
44
           "MINIMAL DIFFERENCES ALLOWED");
45
 
46
     --------------------------------------------------
47
 
48
     -- ONE SUBPROGRAM IS DECLARED IN AN OUTER
49
     -- DECLARATIVE PART, THE OTHER IN AN INNER
50
     -- PART, AND THE PARAMETERS ARE ORDERED
51
     -- DIFFERENTLY.
52
 
53
     DECLARE
54
          S : STRING (1..2) := "12";
55
 
56
          PROCEDURE P (I1 : INTEGER; I2 : IN OUT INTEGER;
57
                       B1 : BOOLEAN) IS
58
          BEGIN
59
               S(1) := 'A';
60
          END P;
61
 
62
     BEGIN
63
          DECLARE
64
               I : INTEGER := 0;
65
 
66
               PROCEDURE P (B1 : BOOLEAN; I1 : INTEGER;
67
                            I2 : IN OUT INTEGER) IS
68
               BEGIN
69
                    S(2) := 'B';
70
               END P;
71
 
72
          BEGIN
73
               P (5, I, TRUE);
74
               P (TRUE, 5, I);
75
               -- NOTE THAT A CALL IN WHICH ALL ACTUAL PARAMETERS 
76
               -- ARE NAMED_ASSOCIATIONS IS AMBIGUOUS.
77
 
78
               IF S /= "AB" THEN
79
                    FAILED ("PROCEDURES IN " &
80
                            "ENCLOSING-ENCLOSED SCOPES " &
81
                            "DIFFERING ONLY IN PARAMETER " &
82
                            "TYPE ORDER CAUSED CONFUSION");
83
               END IF;
84
          END;
85
     END;
86
 
87
     --------------------------------------------------
88
 
89
     RESULT;
90
 
91
END C66002E;

powered by: WebSVN 2.1.0

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