2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / ada / acats / tests / c4 / c41303k.ada
blobbb6f2a78574619ce6a97e3aaa38acd3c4a2bbc4f
1 -- C41303K.ADA
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.
16 -- DISCLAIMER
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.
33 -- THIS OBJECTIVE IS COVERED IN SEVERAL TESTS. IN THE FOLLOWING DIAGRAM,
34 -- THE PORTION COVERED BY THE CURRENT TEST IS MARKED BY 'X' .
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 || |
55 -- --------------||-------------|--------------------
56 -- ACC ACC SCLR || XXXXXXXXX |
57 -- ============================================================
60 -- RM 1/20/82
61 -- RM 1/25/82
62 -- SPS 12/2/82
65 WITH REPORT;
66 USE REPORT;
67 PROCEDURE C41303K IS
70 BEGIN
72 TEST ( "C41303K" , "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" );
78 -------------------------------------------------------------------
79 --------------- ACCESS TO ACCESS TO SCALAR ----------------------
81 DECLARE
83 TYPE NEWINT IS NEW INTEGER ;
85 NEWINT_CONST : NEWINT := ( 813 );
86 NEWINT_VAR : NEWINT := NEWINT_CONST ;
87 NEWINT_CONST2 : NEWINT := ( 707 );
89 TYPE ACCNEWINT IS ACCESS NEWINT ;
91 TYPE ACC_ACCNEWINT IS ACCESS ACCNEWINT ;
93 ACC_ACCNEWINT_VAR : ACC_ACCNEWINT := NEW ACCNEWINT'(
94 NEW NEWINT' (
95 NEWINT_CONST2
99 BEGIN
101 NEWINT_VAR := ACC_ACCNEWINT_VAR.ALL.ALL ;
103 IF NEWINT_VAR /= NEWINT_CONST2
104 THEN
105 FAILED( "ACC2 NEWINT,RIGHT SIDE OF ASSIGN., WRONG VAL.");
106 END IF;
109 ACC_ACCNEWINT_VAR.ALL.ALL := NEWINT_CONST ;
111 IF NEWINT_CONST /= ACC_ACCNEWINT_VAR.ALL.ALL
112 THEN
113 FAILED( "ACC2 NEWINT,LEFT SIDE OF ASSIGN., WRONG VAL." );
114 END IF;
117 END ;
119 -------------------------------------------------------------------
121 RESULT;
124 END C41303K;