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/] [c4/] [c41303v.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
-- C41303V.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 THE NOTATION  L.ALL  IS ALLOWED IF  L  IS THE NAME OF AN
26
--     ACCESS OBJECT DESIGNATING A RECORD, AN ARRAY, A SCALAR, OR
27
--     ANOTHER ACCESS OBJECT.
28
-- CHECK THAT IF  A  IS AN IDENTIFIER DENOTING AN ACCESS OBJECT WHICH
29
--     IN TURN DESIGNATES AN ACCESS OBJECT, THE FORM  A.ALL.ALL  IS
30
--     ACCEPTED.
31
 
32
 
33
-- THIS OBJECTIVE IS COVERED IN SEVERAL TESTS. IN THE FOLLOWING DIAGRAM,
34
--     THE PORTION COVERED BY THE CURRENT TEST IS MARKED BY 'X' .
35
 
36
 
37
--                              ||   ASSIGNMT  |  PROC. PARAMETERS
38
--                              ||  ():=  :=() | IN   OUT    IN OUT
39
--      ========================||=============|====================
40
--                 ACC REC      ||             |
41
--                --------------||-------------|--------------------
42
--       1 '.ALL'  ACC ARR      ||             |
43
--                --------------||-------------|--------------------
44
--                 ACC SCLR     ||             |
45
--      ========================||=============|====================
46
--                 ACC ACC REC  ||             |
47
--                --------------||-------------|--------------------
48
--       1 '.ALL'  ACC ACC ARR  ||             |
49
--                --------------||-------------|--------------------
50
--                 ACC ACC SCLR ||             |
51
--      ========================||=============|====================
52
--                 ACC ACC REC  ||             |
53
--                --------------||-------------|--------------------
54
--       2 '.ALL'  ACC ACC ARR  ||             |     XXXXXXXXX
55
--                --------------||-------------|--------------------
56
--                 ACC ACC SCLR ||             |
57
--      ============================================================
58
 
59
 
60
-- RM  1/29/82
61
-- SPS 12/2/82
62
 
63
 
64
 
65
WITH REPORT;
66
USE REPORT;
67
PROCEDURE C41303V IS
68
 
69
 
70
BEGIN
71
 
72
     TEST ( "C41303V" , "CHECK THAT IF  A  IS AN IDENTIFIER DENOTING" &
73
                        " AN ACCESS OBJECT WHICH IN TURN DESIGNATES"  &
74
                        " AN ACCESS OBJECT,  THE FORM  A.ALL.ALL  IS" &
75
                        " ACCEPTED" );
76
 
77
 
78
     -------------------------------------------------------------------
79
     ---------------  ACCESS TO ACCESS TO ARRAY  -----------------------
80
 
81
     DECLARE
82
 
83
          TYPE  ARR     IS  ARRAY(1..2) OF BOOLEAN ;
84
 
85
          ARR_CONST    :  ARR  :=  ( TRUE , FALSE );
86
          ARR_VAR      :  ARR  :=    ARR_CONST  ;
87
          ARR_VAR0     :  ARR  :=    ARR_CONST  ;
88
          ARR_CONST2   :  ARR  :=  ( FALSE , TRUE );
89
 
90
          TYPE  ACCARR  IS  ACCESS ARR ;
91
 
92
          TYPE  ACC_ACCARR  IS  ACCESS ACCARR ;
93
 
94
          ACC_ACCARR_VAR  :  ACC_ACCARR :=  NEW ACCARR'(
95
                                            NEW ARR'( ARR_CONST2 )
96
                                                      );
97
 
98
          ACC_ACCARR_VAR0 :  ACC_ACCARR :=  NEW ACCARR'(
99
                                            NEW ARR'( ARR_CONST2 )
100
                                                      );
101
 
102
 
103
          PROCEDURE  R_ASSIGN( R_IN    : IN      ARR ;
104
                               R_INOUT : IN OUT  ARR )  IS
105
          BEGIN
106
               ARR_VAR   :=  R_IN    ;
107
               ARR_VAR0  :=  R_INOUT ;
108
          END ;
109
 
110
 
111
          PROCEDURE  L_ASSIGN( L_OUT   :    OUT  ARR ;
112
                               L_INOUT : IN OUT  ARR )  IS
113
          BEGIN
114
               L_OUT   :=  ARR_CONST ;
115
               L_INOUT :=  ARR_CONST ;
116
          END ;
117
 
118
 
119
     BEGIN
120
 
121
 
122
          R_ASSIGN( ACC_ACCARR_VAR.ALL.ALL , ACC_ACCARR_VAR0.ALL.ALL );
123
 
124
          IF  ARR_VAR /= ARR_CONST2
125
          THEN
126
               FAILED( "ACC2 ARRAY, RIGHT SIDE (1), WRONG VAL." );
127
          END IF;
128
 
129
          IF  ARR_VAR0 /= ARR_CONST2
130
          THEN
131
               FAILED( "ACC2 ARRAY, RIGHT SIDE (2), WRONG VAL." );
132
          END IF;
133
 
134
 
135
          L_ASSIGN( ACC_ACCARR_VAR.ALL.ALL , ACC_ACCARR_VAR0.ALL.ALL );
136
 
137
          IF  ( TRUE , FALSE ) /= ACC_ACCARR_VAR.ALL.ALL
138
          THEN
139
               FAILED( "ACC2 ARRAY, LEFT SIDE (1), WRONG VAL." );
140
          END IF;
141
 
142
          IF  ( TRUE , FALSE ) /= ACC_ACCARR_VAR0.ALL.ALL
143
          THEN
144
               FAILED( "ACC2 ARRAY, LEFT SIDE (2), WRONG VAL." );
145
          END IF;
146
 
147
 
148
     END ;
149
 
150
     -------------------------------------------------------------------
151
 
152
     RESULT;
153
 
154
 
155
END C41303V;

powered by: WebSVN 2.1.0

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