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/] [a/] [ac3206a.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- AC3206A.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 AN INSTANTIATION IS LEGAL IF A FORMAL PRIVATE TYPE IS
27
--     USED IN  A CONSTANT DECLARATION AND THE ACTUAL PARAMETER IS A
28
--     TYPE WITH DISCRIMINANTS THAT DO AND DO NOT HAVE DEFAULTS. (CHECK
29
--     CASES THAT USED TO BE FORBIDDEN).
30
 
31
-- HISTORY:
32
--     DHH 09/16/88  CREATED ORIGINAL TEST.
33
 
34
WITH REPORT; USE REPORT;
35
PROCEDURE AC3206A IS
36
 
37
BEGIN
38
     TEST ("AC3206A", "CHECK THAT AN INSTANTIATION IS LEGAL IF A " &
39
                      "FORMAL PRIVATE TYPE IS USED IN  A CONSTANT " &
40
                      "DECLARATION AND THE ACTUAL PARAMETER IS A " &
41
                      "TYPE WITH DISCRIMINANTS THAT DO AND DO NOT " &
42
                      "HAVE DEFAULTS");
43
 
44
     DECLARE             -- CHECK DEFAULTS LEGAL UNDER AI-37.
45
 
46
          GENERIC
47
               TYPE GEN IS PRIVATE;
48
               INIT : GEN;
49
          PACKAGE GEN_PACK IS
50
               CONST : CONSTANT GEN := INIT;
51
               SUBTYPE NEW_GEN IS GEN;
52
          END GEN_PACK;
53
 
54
          TYPE REC(A : INTEGER := 4) IS
55
               RECORD
56
                    X : INTEGER;
57
                    Y : BOOLEAN;
58
               END RECORD;
59
 
60
          PACKAGE P IS NEW GEN_PACK(REC, (4, 5, FALSE));
61
          USE P;
62
 
63
          CON : CONSTANT P.NEW_GEN := (4, 5, FALSE);
64
 
65
     BEGIN
66
          NULL;
67
     END;
68
 
69
     DECLARE
70
 
71
          GENERIC
72
               TYPE GEN(DIS : INTEGER) IS PRIVATE;
73
               INIT : GEN;
74
          PACKAGE GEN_PACK IS
75
               CONST : CONSTANT GEN := INIT;
76
               SUBTYPE NEW_GEN IS GEN(4);
77
          END GEN_PACK;
78
 
79
          TYPE REC(A : INTEGER := 4) IS
80
               RECORD
81
                    X : INTEGER;
82
                    Y : BOOLEAN;
83
               END RECORD;
84
 
85
          PACKAGE P IS NEW GEN_PACK(REC, (4, 5, FALSE));
86
          USE P;
87
 
88
          CON : CONSTANT P.NEW_GEN := (4, 5, FALSE);
89
 
90
     BEGIN
91
          NULL;
92
     END;
93
 
94
     DECLARE
95
 
96
          GENERIC
97
               TYPE GEN(DIS : INTEGER) IS PRIVATE;
98
               INIT : GEN;
99
          PACKAGE GEN_PACK IS
100
               CONST : CONSTANT GEN := INIT;
101
               SUBTYPE NEW_GEN IS GEN(4);
102
          END GEN_PACK;
103
 
104
          TYPE REC(A : INTEGER) IS
105
               RECORD
106
                    X : INTEGER;
107
                    Y : BOOLEAN;
108
               END RECORD;
109
 
110
          PACKAGE P IS NEW GEN_PACK(REC, (4, 5, FALSE));
111
          USE P;
112
 
113
          CON : CONSTANT P.NEW_GEN := (4, 5, FALSE);
114
 
115
     BEGIN
116
          NULL;
117
     END;
118
 
119
     RESULT;
120
END AC3206A;

powered by: WebSVN 2.1.0

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