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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- A71004A.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 ALL FORMS OF DECLARATION PERMITTED IN THE PRIVATE PART OF
26
-- A PACKAGE ARE INDEED ACCEPTED BY THE COMPILER. 
27
-- TASKS, GENERICS, FIXED AND FLOAT DECLARATIONS ARE NOT TESTED.
28
 
29
-- DAT 5/6/81
30
-- VKG 2/16/83
31
 
32
WITH REPORT; USE REPORT;
33
 
34
PROCEDURE A71004A IS
35
BEGIN
36
 
37
     TEST ("A71004A", "ALL FORMS OF DECLARATIONS IN PRIVATE PART");
38
 
39
     DD:
40
     DECLARE
41
 
42
          PACKAGE P1 IS
43
 
44
               TYPE P IS PRIVATE;
45
               TYPE L IS LIMITED PRIVATE;
46
               CP : CONSTANT P;
47
               CL : CONSTANT L;
48
 
49
          PRIVATE
50
 
51
               ONE : CONSTANT := 1;
52
               TWO : CONSTANT := ONE * 1.0 + 1.0;
53
               N1, N2, N3 : CONSTANT := TWO;
54
               TYPE I IS RANGE -10 .. 10;
55
               X4, X5 : CONSTANT I := I(IDENT_INT(3));
56
               X6, X7 : I := X4 + X5;
57
               TYPE AR IS ARRAY (I) OF L;
58
 
59
               X10 : ARRAY (IDENT_INT(1) .. IDENT_INT (10)) OF I;
60
               X11 : CONSTANT ARRAY (1..10) OF I := (1..10=>3);
61
               TYPE T3 IS (E12);
62
               TYPE T4 IS NEW T3;
63
 
64
               TYPE REC1 (D:BOOLEAN:=TRUE) IS RECORD NULL; END RECORD;
65
               SUBTYPE  REC1TRUE  IS  REC1( D => TRUE ) ;
66
               TYPE L IS NEW REC1TRUE ;
67
               X8 , X9 : AR;
68
               TYPE  A6  IS  ACCESS REC1 ;
69
               SUBTYPE  L1  IS  L ;
70
               SUBTYPE  A7  IS  A6(D=>TRUE);
71
               SUBTYPE I14 IS I RANGE 1 .. 1;
72
               TYPE UA1 IS ARRAY (I14 RANGE <> ) OF I14;
73
               TYPE UA2 IS NEW UA1;
74
               USE STANDARD.ASCII;
75
 
76
               PROCEDURE P1 ;
77
 
78
               FUNCTION F1 (X : UA1) RETURN UA1;
79
 
80
               FUNCTION "+" (X : UA1) RETURN UA1;
81
 
82
               PACKAGE  PK IS
83
               PRIVATE
84
               END;
85
 
86
               PACKAGE PK1 IS
87
                    PACKAGE PK2 IS END;
88
               PRIVATE
89
                    PACKAGE PK3 IS PRIVATE END;
90
               END PK1;
91
 
92
               EX : EXCEPTION;
93
               EX1, EX2 : EXCEPTION;
94
               X99 : I RENAMES X7;
95
               EX3 : EXCEPTION RENAMES EX1;
96
               PACKAGE PQ1 RENAMES DD.P1;
97
               PACKAGE PQ2 RENAMES PK1;
98
               PACKAGE PQ3 RENAMES PQ2 . PK2;
99
               FUNCTION "-" (X : UA1) RETURN UA1 RENAMES "+";
100
               PROCEDURE P98 RENAMES P1;
101
               TYPE P IS NEW L;
102
               CP : CONSTANT P := (D=> TRUE);
103
               CL : CONSTANT L := L(CP);
104
 
105
          END P1;
106
 
107
          PACKAGE BODY P1 IS
108
 
109
               PROCEDURE P1 IS BEGIN NULL; END P1;
110
 
111
               FUNCTION F1 (X : UA1) RETURN UA1 IS
112
               BEGIN RETURN X; END F1;
113
 
114
               FUNCTION "+" (X : UA1) RETURN UA1 IS
115
               BEGIN RETURN F1(X); END "+";
116
 
117
               PACKAGE BODY PK1 IS
118
                    PACKAGE BODY PK3 IS END;
119
               END PK1;
120
 
121
          BEGIN
122
               NULL ;
123
          END P1;
124
 
125
     BEGIN
126
          NULL;
127
     END DD;
128
     RESULT;
129
 
130
END A71004A;

powered by: WebSVN 2.1.0

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