3 -- Grant of Unlimited Rights
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
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.
25 -- CHECK THAT CONSTRAINT_ERROR IS RAISED IN AN OBJECT DECLARATION IF
26 -- A DEFAULT INITIAL VALUE HAS BEEN SPECIFIED WHICH VIOLATES THE
27 -- CONSTRAINTS OF A RECORD OR AN ARRAY TYPE WHOSE CONSTRAINT
28 -- DEPENDS ON A DISCRIMINANT, AND NO EXPLICIT INITIALIZATION IS
29 -- PROVIDED FOR THE OBJECT.
32 -- EDS 7/16/98 AVOID OPTIMIZATION
34 WITH REPORT
; USE REPORT
;
37 TYPE ARR
IS ARRAY (POSITIVE RANGE <>) OF INTEGER;
39 TYPE R
(P
: POSITIVE) IS
45 TEST
( "C37108B", "CHECK THAT CONSTRAINT_ERROR IS RAISED IN " &
46 "AN OBJECT DECLARATION IF A DEFAULT INITIAL " &
47 "VALUE HAS BEEN SPECIFIED WHICH VIOLATES THE " &
48 "CONSTRAINTS OF A RECORD OR AN ARRAY TYPE " &
49 "WHOSE CONSTRAINT DEPENDS ON A DISCRIMINANT, " &
50 "AND NO EXPLICIT INITIALIZATION IS PROVIDED " &
56 TYPE REC1
(D
: NATURAL := IDENT_INT
(0)) IS
66 R1
.A
(1) := IDENT_INT
(2);
67 FAILED
( "NO EXCEPTION RAISED AT DECLARATION OF " &
68 "R1" & INTEGER'IMAGE(R1
.A
(5))); --USE R2
71 FAILED
( "EXCEPTION FOR R1 RAISED INSIDE " &
76 WHEN CONSTRAINT_ERROR
=>
79 FAILED
( "WRONG EXCEPTION RAISED AT DECLARATION " &
84 WHEN CONSTRAINT_ERROR
=>
85 FAILED
( "CONSTRAINT_ERROR RAISED FOR TYPE " &
86 "DECLARATION OF REC1" );
88 FAILED
( "OTHER EXCEPTION RAISED FOR TYPE " &
89 "DECLARATION OF REC1" );
94 TYPE REC2
(D
: INTEGER := IDENT_INT
(-1)) IS
104 R2
.A
:= R
'(P => IDENT_INT (1));
105 FAILED ( "NO EXCEPTION RAISED AT DECLARATION OF " &
106 "R2" & INTEGER'IMAGE(R2.A.P)); --USE R2
109 FAILED ( "EXCEPTION FOR R2 RAISED INSIDE " &
114 WHEN CONSTRAINT_ERROR =>
117 FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
122 WHEN CONSTRAINT_ERROR =>
123 FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE " &
124 "DECLARATION OF REC2" );
126 FAILED ( "OTHER EXCEPTION RAISED FOR TYPE " &
127 "DECLARATION OF REC2" );
133 TYPE REC3 (D : INTEGER := IDENT_INT (-1)) IS
135 PROCEDURE PROC (R :REC3);
138 TYPE REC3 (D : INTEGER := IDENT_INT (-1)) IS
145 PROCEDURE PROC (R : REC3) IS
148 I := IDENT_INT (R.A.P);
149 IF EQUAL(2, IDENT_INT(1)) THEN
150 FAILED("IMPOSSIBLE " & INTEGER'IMAGE(I)); --USE I
163 FAILED ( "NO EXCEPTION RAISED AT " &
164 "DECLARATION OF R3" );
167 FAILED ( "EXCEPTION FOR R3 RAISED INSIDE " &
172 WHEN CONSTRAINT_ERROR =>
175 FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
180 WHEN CONSTRAINT_ERROR =>
181 FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE " &
182 "DECLARATION OF REC3" );
184 FAILED ( "OTHER EXCEPTION RAISED FOR TYPE " &
185 "DECLARATION OF REC3" );
191 TYPE REC4 (D : NATURAL := IDENT_INT (0))
193 PROCEDURE PROC (R :REC4);
196 TYPE REC4 (D : NATURAL := IDENT_INT (0)) IS
202 PACKAGE BODY LPRIV IS
203 PROCEDURE PROC (R : REC4) IS
206 I := IDENT_INT (R.A'FIRST);
207 IF EQUAL(2, IDENT_INT(1)) THEN
208 FAILED("IMPOSSIBLE " & INTEGER'IMAGE(I)); --USE I
221 FAILED ( "NO EXCEPTION RAISED AT " &
222 "DECLARATION OF R4" );
225 FAILED ( "EXCEPTION FOR R4 RAISED INSIDE " &
230 WHEN CONSTRAINT_ERROR =>
233 FAILED ( "WRONG EXCEPTION RAISED AT DECLARATION " &
238 WHEN CONSTRAINT_ERROR =>
239 FAILED ( "CONSTRAINT_ERROR RAISED FOR TYPE " &
240 "DECLARATION OF REC4" );
242 FAILED ( "OTHER EXCEPTION RAISED FOR TYPE " &
243 "DECLARATION OF REC4" );