1-- LA140021.AM 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-- 26-- OBJECTIVE: 27-- Check that a compilation unit may not depend semantically 28-- on two different versions of the same compilation unit. 29-- Check the case where a unit depends on a package whose 30-- declaration is changed. 31-- 32-- TEST DESCRIPTION: 33-- This test compiles the specification of a package containing 34-- the specification of a procedure. Then it compiles the body 35-- of the package containing the body of the procedure and the 36-- main test procedure. The main procedure withs the first 37-- package and calls the procedure in the first package. Then, 38-- the withed package specification is changed and recompiled. 39-- Unless automatic recompilation is supported, this test should 40-- fail to link. Otherwise, the test should recompile the package 41-- body and main procedure, link the correct versions of the unit, 42-- and report "PASSED" at execution time. 43-- 44-- SPECIAL REQUIREMENTS: 45-- To build this test: 46-- 1) Compile the file LA140020 (and include the results in the 47-- program library). 48-- 2) Compile the file LA140021 (and include the results in the 49-- program library). 50-- 3) Compile the file LA140022 (and include the results in the 51-- program library). 52-- 4) Attempt to build an executable image. 53-- 5) If an executable image results, run it. 54-- 55-- TEST FILES: 56-- This test consists of the following files: 57-- LA140020.A 58-- -> LA140021.AM 59-- LA140022.A 60-- 61-- PASS/FAIL CRITERIA: 62-- The test passes if a link time error message reports that 63-- LA140020_0 is missing or obsolete and no executable image 64-- results. The test also passes if an executable image is produced 65-- and reports "PASSED" (in the case where the implementation supports 66-- automatic recompilation). 67-- 68-- 69-- CHANGE HISTORY: 70-- 01 MAY 95 ACVC 1.12 LA5007J baseline version 71-- 08 MAY 95 SAIC Initial version 72-- 16 NOV 96 SAIC Changed unit and file names to conform to 73-- coding conventions. 74-- 07 DEC 96 SAIC Moved LA140020_0 to a separate file. 75-- 76--! 77 78with Report; use Report; 79with LA140020_0; 80 81procedure LA140021 is 82 TC_Val : integer := 0; 83begin 84 Test ("LA14002", "Check that a compilation unit may not depend " & 85 "semantically on two different versions of " & 86 "the same compilation unit. Check the case " & 87 "where a unit depends on a package whose " & 88 "declaration is changed"); 89 90 LA140020_0.P (TC_Val); 91 if TC_Val = 100 then 92 Failed ("Changed unit not used"); 93 elsif TC_Val /= -10 then 94 Failed ("Incorrect test value"); 95 end if; 96 97 Result; 98end LA140021; 99