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

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

Line No. Rev Author Line
1 294 jeremybenn
-- C66002F.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
--     (F) ONE SUBPROGRAM IS DECLARED IN AN OUTER DECLARATIVE PART,
30
--         THE OTHER IN AN INNER PART, AND ONE HAS ONE MORE PARAMETER
31
--         THAN THE OTHER; THE OMITTED PARAMETER HAS A DEFAULT VALUE.
32
 
33
-- CVP 5/4/81
34
-- JRK 5/8/81
35
-- NL 10/13/81
36
 
37
WITH REPORT;
38
PROCEDURE C66002F IS
39
 
40
     USE REPORT;
41
 
42
BEGIN
43
     TEST ("C66002F", "SUBPROGRAM OVERLOADING WITH " &
44
           "MINIMAL DIFFERENCES ALLOWED");
45
 
46
     --------------------------------------------------
47
 
48
     -- ONE SUBPROGRAM IS IN AN OUTER DECLARATIVE 
49
     -- PART, THE OTHER IN AN INNER PART, AND ONE
50
     -- HAS ONE MORE PARAMETER (WITH A DEFAULT
51
     -- VALUE) THAN THE OTHER.
52
 
53
     BF :
54
     DECLARE
55
          S : STRING (1..3) := "123";
56
 
57
          PROCEDURE P (I1, I2, I3 : INTEGER := 1) IS
58
               C : CONSTANT STRING := "CXA";
59
          BEGIN
60
               S(I3) := C(I3);
61
          END P;
62
 
63
          PROCEDURE ENCLOSE IS
64
 
65
               PROCEDURE P (I1, I2 : INTEGER := 1) IS
66
               BEGIN
67
                    S(2) := 'B';
68
               END P;
69
 
70
          BEGIN -- ENCLOSE
71
               P (1, 2, 3);
72
               ENCLOSE.P (1, 2); -- NOTE THAT THESE CALLS
73
               BF.P (1, 2);      -- MUST BE DISAMBIGUATED.
74
 
75
               IF S /= "CBA" THEN
76
                    FAILED ("PROCEDURES IN ENCLOSING-" &
77
                            "ENCLOSED SCOPES DIFFERING " &
78
                            "ONLY IN EXISTENCE OF ONE " &
79
                            "DEFAULT-VALUED PARAMETER CAUSED " &
80
                            "CONFUSION");
81
               END IF;
82
          END ENCLOSE;
83
 
84
     BEGIN
85
          ENCLOSE;
86
     END BF;
87
 
88
     --------------------------------------------------
89
 
90
     RESULT;
91
 
92
END C66002F;

powered by: WebSVN 2.1.0

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