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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c3/] [c34014g.ada] - Blame information for rev 750

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

Line No. Rev Author Line
1 720 jeremybenn
-- C34014G.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
-- OBJECTIVE:
26
--     CHECK THAT A DERIVED SUBPROGRAM IS VISIBLE AND FURTHER DERIVABLE
27
--     UNDER APPROPRIATE CIRCUMSTANCES.
28
 
29
--     CHECK WHEN THE DERIVED SUBPROGRAM IS IMPLICITLY DECLARED IN THE
30
--     VISIBLE PART OF A PACKAGE AND NO HOMOGRAPHIC SUBPROGRAM IS LATER
31
--     DECLARED EXPLICITLY.
32
 
33
-- HISTORY:
34
--     JRK 09/16/87  CREATED ORIGINAL TEST.
35
 
36
WITH REPORT; USE REPORT;
37
 
38
PROCEDURE C34014G IS
39
 
40
     PACKAGE P IS
41
          TYPE T IS RANGE -100 .. 100;
42
          FUNCTION F RETURN T;
43
     END P;
44
     USE P;
45
 
46
     PACKAGE BODY P IS
47
          FUNCTION F RETURN T IS
48
          BEGIN
49
               RETURN T (IDENT_INT (1));
50
          END F;
51
     END P;
52
 
53
BEGIN
54
     TEST ("C34014G", "CHECK THAT A DERIVED SUBPROGRAM IS VISIBLE " &
55
                      "AND FURTHER DERIVABLE UNDER APPROPRIATE " &
56
                      "CIRCUMSTANCES.  CHECK WHEN THE DERIVED " &
57
                      "SUBPROGRAM IS IMPLICITLY DECLARED IN THE " &
58
                      "VISIBLE PART OF A PACKAGE AND NO HOMOGRAPHIC " &
59
                      "SUBPROGRAM IS LATER DECLARED EXPLICITLY");
60
 
61
     -----------------------------------------------------------------
62
 
63
     COMMENT ("NO NEW SUBPROGRAM DECLARED EXPLICITLY");
64
 
65
     DECLARE
66
 
67
          PACKAGE Q IS
68
               TYPE QT IS NEW T;
69
               X : QT := F;
70
          PRIVATE
71
               TYPE QS IS NEW QT;
72
               Z : QS := F;
73
          END Q;
74
          USE Q;
75
 
76
          PACKAGE BODY Q IS
77
          BEGIN
78
               IF X /= 1 THEN
79
                    FAILED ("OLD SUBPROGRAM NOT VISIBLE - 1");
80
               END IF;
81
 
82
               IF Z /= 1 THEN
83
                    FAILED ("OLD SUBPROGRAM NOT DERIVED - 1");
84
               END IF;
85
          END Q;
86
 
87
          PACKAGE R IS
88
               Y : QT := F;
89
               TYPE RT IS NEW QT;
90
               Z : RT := F;
91
          END R;
92
          USE R;
93
 
94
     BEGIN
95
          IF Y /= 1 THEN
96
               FAILED ("OLD SUBPROGRAM NOT VISIBLE - 2");
97
          END IF;
98
 
99
          IF Z /= 1 THEN
100
               FAILED ("OLD SUBPROGRAM NOT DERIVED - 2");
101
          END IF;
102
     END;
103
 
104
     -----------------------------------------------------------------
105
 
106
     RESULT;
107
END C34014G;

powered by: WebSVN 2.1.0

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