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.
27 -- Check that a compilation unit may not depend semantically on two
28 -- different versions of the same compilation unit. Check the case
29 -- where a generic package body depends on a generic package
33 -- This test compiles a generic package specification and body,
34 -- followed by a procedure that makes a call to a procedure
35 -- contained inside the generic package. Then, the generic package
36 -- specification is recompiled, making the body of the generic
37 -- package obsolete. Unless automatic recompilation is
38 -- supported this test should fail to link. Otherwise, the test should
39 -- recompile and link the correct version of the units and report
40 -- "PASSED" at execution time.
42 -- SPECIAL REQUIREMENTS:
43 -- To build this test:
44 -- 1) Compile the file LA140050 (and include the results in the
46 -- 2) Compile the file LA140051 (and include the results in the
48 -- 3) Compile the file LA140052 (and include the results in the
50 -- 4) Compile the file LA140053 (and include the results in the
52 -- 5) Attempt to build an executable image.
53 -- 6) If an executable image results, run it.
56 -- This test consists of the following files:
62 -- PASS/FAIL CRITERIA:
63 -- Expect a link-time error message that the body of generic
64 -- package LA14005_1 is missing or obsolete. If automatic
65 -- recompilation is supported, and an executable image is
66 -- built, expect a "PASSED" message from execution.
70 -- 01 MAY 95 ACVC 1.12 LA5008I baseline version
71 -- 09 MAY 95 SAIC Initial version
72 -- 08 NOV 96 SAIC Unit naming correction
73 -- 07 DEC 96 SAIC Moved spec of LA14005_1 to a separate file.
77 package body LA14005_1 is
78 function return_flt return types.gen_flt is
80 return types.gen_flt(types.TC_var);
83 types.TC_var := types.flt(TC_constant_flt);
86 ---------------------------------------------------------
88 with Report; use Report;
92 subtype TC_flt is float digits 5;
94 package Y is new LA14005_0 (integer(100.0), integer(0.0), TC_flt);
95 package inst is new LA14005_1 (Y);
98 Test ("LA14005", "Check that a compilation unit may not depend " &
99 "semantically on two different versions of the same " &
100 "compilation unit. Check the case where a generic package " &
101 "body depends on a generic package specification");
103 TC_var := TC_flt(inst.return_flt);
105 if TC_Var /= TC_flt(Y.min) then
106 Failed ("Obsolete unit used in elaboration");