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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C41303Q.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  ||             |     XXXXXXXXX
47
--                --------------||-------------|--------------------
48
--       1 '.ALL'  ACC ACC ARR  ||             |
49
--                --------------||-------------|--------------------
50
--                 ACC ACC SCLR ||             |
51
--      ========================||=============|====================
52
--                 ACC ACC REC  ||             |
53
--                --------------||-------------|--------------------
54
--       2 '.ALL'  ACC ACC ARR  ||             |
55
--                --------------||-------------|--------------------
56
--                 ACC ACC SCLR ||             |
57
--      ============================================================
58
 
59
 
60
-- RM  1/28/82
61
-- SPS 12/2/82
62
 
63
 
64
WITH REPORT;
65
USE REPORT;
66
PROCEDURE C41303Q IS
67
 
68
 
69
BEGIN
70
 
71
     TEST ( "C41303Q" , "CHECK THAT THE NOTATION  L.ALL  IS ALLOWED IF"
72
                    &   "  L  IS THE NAME OF AN ACCESS OBJECT"
73
                    &   " DESIGNATING  ANOTHER ACCESS OBJECT" );
74
 
75
 
76
     -------------------------------------------------------------------
77
     ---------------  ACCESS TO ACCESS TO RECORD  ----------------------
78
 
79
     DECLARE
80
 
81
          TYPE  REC  IS
82
 
83
               RECORD
84
                    A , B , C : INTEGER ;
85
               END RECORD ;
86
 
87
 
88
          TYPE  ACCREC  IS  ACCESS REC ;
89
 
90
          ACCREC_CONST    :  ACCREC  :=  NEW REC'( 7 , 8 , 9 );
91
          ACCREC_VAR      :  ACCREC  :=    ACCREC_CONST ;
92
          ACCREC_VAR0     :  ACCREC  :=    ACCREC_CONST ;
93
          ACCREC_CONST2   :  ACCREC  :=  NEW REC'( 17 , 18 , 19 );
94
 
95
          TYPE ACC_ACCREC  IS  ACCESS ACCREC ;
96
 
97
          ACC_ACCREC_VAR  :  ACC_ACCREC :=  NEW ACCREC'(ACCREC_CONST2);
98
          ACC_ACCREC_VAR0 :  ACC_ACCREC :=  NEW ACCREC'(ACCREC_CONST2);
99
 
100
          PROCEDURE  R_ASSIGN( R_IN    : IN      ACCREC ;
101
                               R_INOUT : IN OUT  ACCREC )  IS
102
          BEGIN
103
               ACCREC_VAR   :=  R_IN    ;
104
               ACCREC_VAR0  :=  R_INOUT ;
105
          END ;
106
 
107
 
108
          PROCEDURE  L_ASSIGN( L_OUT   :    OUT  ACCREC ;
109
                               L_INOUT : IN OUT  ACCREC )  IS
110
          BEGIN
111
               L_OUT   :=  ACCREC_CONST ;
112
               L_INOUT :=  ACCREC_CONST ;
113
          END ;
114
 
115
 
116
     BEGIN
117
 
118
 
119
          R_ASSIGN( ACC_ACCREC_VAR.ALL , ACC_ACCREC_VAR0.ALL );
120
 
121
          IF  ACCREC_VAR /= ACCREC_CONST2
122
          THEN
123
               FAILED( "ACC. RECORD, RIGHT SIDE (1), WRONG VAL.");
124
          END IF;
125
 
126
          IF  ACCREC_VAR0 /= ACCREC_CONST2
127
          THEN
128
               FAILED( "ACC. RECORD, RIGHT SIDE (2), WRONG VAL.");
129
          END IF;
130
 
131
 
132
          L_ASSIGN( ACC_ACCREC_VAR.ALL , ACC_ACCREC_VAR0.ALL );
133
 
134
          IF  ACCREC_CONST /= ACC_ACCREC_VAR.ALL
135
          THEN
136
              FAILED( "ACC. RECORD, LEFT SIDE (1), WRONG VAL." );
137
          END IF;
138
 
139
          IF  ACCREC_CONST /= ACC_ACCREC_VAR0.ALL
140
          THEN
141
               FAILED( "ACC. RECORD, LEFT SIDE (2), WRONG VAL." );
142
          END IF;
143
 
144
 
145
     END ;
146
 
147
     -------------------------------------------------------------------
148
 
149
     RESULT;
150
 
151
 
152
END C41303Q;

powered by: WebSVN 2.1.0

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