Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / ada / acats / tests / l / la140122.am
blob06cacb3e676f918863209ad269ab69a36e085d52
1 -- LA140122.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.
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 --*
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 library level function depends
30 --      on a unit that is changed.
32 -- TEST DESCRIPTION:
33 --      This test compiles a function, a function that withs 
34 --      the first function, and a procedure that withs the second
35 --      function.  Then, a new version of the first function is 
36 --      compiled (in a separate file, simulating an editing 
37 --      modification to the package).  Unless automatic recompilation 
38 --      is supported, this test should fail to link.  Otherwise, the 
39 --      test should recompile and link the correct version of the 
40 --      withed package and report "PASSED" at execution time.
42 -- SPECIAL REQUIREMENTS:
43 --      To build this test:
44 --         1) Compile the file LA140120 (and include the results in the
45 --            program library).
46 --         2) Compile the file LA140121 (and include the results in the
47 --            program library).
48 --         3) Compile the file LA140122 (and include the results in the
49 --            program library).
50 --         4) Compile the file LA140123 (and include the results in the
51 --            program library).
52 --         5) Attempt to build an executable image.
53 --         6) If an executable image results, run it.
55 -- TEST FILES:
56 --      This test consists of the following files:
57 --         LA140120.A
58 --         LA140121.A
59 --      -> LA140122.AM
60 --         LA140123.A
62 -- PASS/FAIL CRITERIA:    
63 --      The test passes if a link time error message reports that 
64 --      LA14012_1 is missing or obsolete and no executable image
65 --      results.  The test also passes if an executable image is produced
66 --      and reports "PASSED" (in the case where the implementation supports
67 --      automatic recompilation).            
70 -- CHANGE HISTORY:
71 --     01 MAY 95   ACVC 1.12   LA5007Q baseline version
72 --     25 MAY 95   SAIC        Initial version
73 --     17 NOV 96   SAIC        Modified unit names and prologue to conform
74 --                             to coding conventions.
76 --!
78 with Report; use Report;
79 with LA14012_1;              -- when LA14012_0 is revised and recompiled,
80                              -- this semantic dependency has to be 
81                              -- handled
84 procedure LA140122 is
85      TC_local : integer := 5;
86 begin
87      Test ("LA14012", "Check that a compilation unit may not depend " &
88                       "semantically on two different versions of " &
89                       "the same compilation unit.  Check the case " &
90                       "where a library level function depends on a " &
91                       "unit that is changed");
93      TC_local := LA14012_1;
95      if TC_local = 100 then
96           Failed ("Revised function not used");
97      elsif TC_local /= -10 then
98           Failed ("Incorrect value returned");
99      end if;
101      Result;
102 end LA140122;