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

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

Line No. Rev Author Line
1 149 jeremybenn
-- C95095E.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
--     (E) A SUBPROGRAM IS DECLARED IN AN OUTER DECLARATIVE PART,
30
--         AN ENTRY IN A TASK, AND ONE HAS ONE MORE PARAMETER
31
--         THAN THE OTHER; THE OMITTED PARAMETER HAS A DEFAULT VALUE.
32
 
33
-- JWC 7/30/85
34
-- JRK 10/2/85
35
 
36
WITH REPORT; USE REPORT;
37
PROCEDURE C95095E IS
38
 
39
BEGIN
40
     TEST ("C95095E", "SUBPROGRAM/ENTRY OVERLOADING WITH " &
41
                      "MINIMAL DIFFERENCES ALLOWED");
42
 
43
     --------------------------------------------------
44
 
45
     -- A SUBPROGRAM IS IN AN OUTER DECLARATIVE
46
     -- PART, AN ENTRY IN A TASK, AND ONE
47
     -- HAS ONE MORE PARAMETER (WITH A DEFAULT
48
     -- VALUE) THAN THE OTHER.
49
 
50
     DECLARE
51
          S : STRING (1..3) := "123";
52
 
53
          PROCEDURE E (I1, I2, I3 : INTEGER := 1) IS
54
               C : CONSTANT STRING := "CXA";
55
          BEGIN
56
               S (I3) := C (I3);
57
          END E;
58
 
59
          TASK T IS
60
               ENTRY E (I1, I2 : INTEGER := 1);
61
          END T;
62
 
63
          TASK BODY T IS
64
          BEGIN
65
               ACCEPT E (I1, I2 : INTEGER := 1) DO
66
                    S (2) := 'B';
67
               END E;
68
          END T;
69
 
70
     BEGIN
71
 
72
          E (1, 2, 3);
73
          T.E (1, 2);
74
          E (1, 2);
75
 
76
          IF S /= "CBA" THEN
77
               FAILED ("PROCEDURES/ENTRIES DIFFERING " &
78
                       "ONLY IN EXISTENCE OF ONE " &
79
                       "DEFAULT-VALUED PARAMETER CAUSED " &
80
                       "CONFUSION");
81
          END IF;
82
 
83
     END;
84
 
85
     --------------------------------------------------
86
 
87
     RESULT;
88
END C95095E;

powered by: WebSVN 2.1.0

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