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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C41303A.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      ||  XXXXXXXXX  |
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  ||             |
55
--                --------------||-------------|--------------------
56
--                 ACC ACC SCLR ||             |
57
--      ============================================================
58
 
59
 
60
-- RM  1/20/82
61
-- RM  1/25/82
62
-- SPS 12/2/82
63
 
64
 
65
WITH REPORT;
66
USE REPORT;
67
PROCEDURE C41303A IS
68
 
69
 
70
BEGIN
71
 
72
     TEST ( "C41303A" , "CHECK THAT THE NOTATION  L.ALL  IS ALLOWED IF"
73
                    &   "  L  IS THE NAME OF AN ACCESS OBJECT"
74
                    &   " DESIGNATING A RECORD, AN ARRAY, OR A SCALAR");
75
 
76
 
77
     -------------------------------------------------------------------
78
     --------------------  ACCESS TO RECORD  ---------------------------
79
 
80
     DECLARE
81
 
82
          TYPE  REC  IS
83
 
84
               RECORD
85
                    A , B , C : INTEGER ;
86
               END RECORD ;
87
 
88
          REC_CONST    :  REC  :=  ( 7 , 8 , 9 );
89
          REC_VAR      :  REC  :=    REC_CONST  ;
90
 
91
          TYPE  ACC_REC  IS  ACCESS REC ;
92
 
93
          ACC_REC_VAR  :  ACC_REC  :=  NEW REC'( 17 , 18 , 19 );
94
 
95
     BEGIN
96
 
97
          REC_VAR          :=  ACC_REC_VAR.ALL ;
98
 
99
          IF  REC_VAR /= ( 17 , 18 , 19 )
100
          THEN
101
               FAILED( "ACC. RECORD, RIGHT SIDE OF ASSIGN.,WRONG VAL.");
102
          END IF;
103
 
104
 
105
          ACC_REC_VAR.ALL  :=  REC_CONST ;
106
 
107
          IF  ACC_REC_VAR.ALL /= ( 7 , 8 , 9 )
108
          THEN
109
               FAILED( "ACC. RECORD, LEFT SIDE OF ASSIGN.,WRONG VAL." );
110
          END IF;
111
 
112
 
113
     END ;
114
 
115
     -------------------------------------------------------------------
116
 
117
     RESULT;
118
 
119
 
120
END C41303A;

powered by: WebSVN 2.1.0

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