summaryrefslogtreecommitdiff
path: root/gcc/testsuite/ada/acats/tests/l
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/ada/acats/tests/l
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/ada/acats/tests/l')
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140010.a51
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140011.am104
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140012.a55
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140020.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140021.am98
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140022.a66
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140030.a57
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140031.a66
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140032.am101
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140033.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140040.a52
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140041.am108
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140042.a53
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140050.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140051.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140052.am110
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140053.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140060.a54
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140061.a66
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140062.am135
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140063.a70
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140070.a62
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140071.a72
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140072.am102
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140073.a63
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140080.a52
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140081.a63
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140082.am106
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140083.a61
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140090.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140091.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140092.am110
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140093.a59
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140100.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140101.a89
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140102.am104
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140103.a58
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140110.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140111.a62
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140112.am103
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140113.a59
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140120.a63
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140121.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140122.am102
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140123.a59
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140130.a57
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140131.a58
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140132.am102
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140133.a58
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140140.a55
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140141.a57
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140142.am102
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140143.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140150.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140151.a65
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140152.am101
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140153.a61
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140160.a54
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140161.a63
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140162.am196
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140163.a67
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140170.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140171.a69
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140172.am121
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140173.a75
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140180.a65
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140181.a54
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140182.am118
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140183.a60
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140190.a61
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140191.a74
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140192.am107
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140193.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140200.a76
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140201.a71
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140202.am144
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140203.a71
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140210.a69
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140211.am134
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140212.a74
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140220.a64
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140221.am128
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140222.a69
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140240.a61
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140241.a55
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140242.am104
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140243.a61
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140250.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140251.am141
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140252.a59
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140260.a98
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140261.a52
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140262.am140
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140263.a57
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140270.a56
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140271.a93
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140272.am102
-rw-r--r--gcc/testsuite/ada/acats/tests/l/la140273.a58
98 files changed, 7532 insertions, 0 deletions
diff --git a/gcc/testsuite/ada/acats/tests/l/la140010.a b/gcc/testsuite/ada/acats/tests/l/la140010.a
new file mode 100644
index 000000000..58ba66195
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140010.a
@@ -0,0 +1,51 @@
+-- LA140010.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140011.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140011.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140011.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140010.A
+-- LA140011.AM
+-- LA140012.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140011.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA140010_0 is
+ TC_Var : integer := 100;
+end LA140010_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140011.am b/gcc/testsuite/ada/acats/tests/l/la140011.am
new file mode 100644
index 000000000..7fd722def
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140011.am
@@ -0,0 +1,104 @@
+-- LA140011.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level function body depends
+-- on a unit that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package, a function that withs the
+-- package, and a procedure that withs the function. Then,
+-- a new version of the package is compiled (in a separate
+-- file, simulating an editing modification to the package).
+-- Unless automatic recompilation is supported, this
+-- test should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the withed package
+-- and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140010 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140011 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140012 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140010.A
+-- -> LA140011.AM
+-- LA140012.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140011_0 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007I baseline version
+-- 08 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Changed unit and file names to conform to
+-- coding standards. Modified prologue.
+-- 07 DEC 96 SAIC Moved LA140010_0 to a separate file.
+--
+--!
+
+function LA140011_0 return integer;
+
+with LA140010_0;
+function LA140011_0 return integer is
+begin
+ return LA140010_0.TC_Var;
+end LA140011_0;
+
+with Report; use Report;
+with LA140011_0;
+procedure LA140011 is
+ TC_Val : integer := 0;
+begin
+ Test ("LA14001", "Check that a compilation unit " &
+ "may not depend semantically on " &
+ "two different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a library level function body " &
+ "depends on a unit that is changed");
+
+ TC_Val := LA140011_0;
+ if TC_Val = 100 then
+ Failed ("Revised package not used");
+ elsif TC_Val /= -10 then
+ Failed ("Incorrect test value returned");
+ end if;
+
+ Result;
+end LA140011;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140012.a b/gcc/testsuite/ada/acats/tests/l/la140012.a
new file mode 100644
index 000000000..1dc8a7c92
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140012.a
@@ -0,0 +1,55 @@
+-- LA140012.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140011.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140011.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140011.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140010.A
+-- LA140011.AM
+-- -> LA140012.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140011.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007I baseline version
+-- 08 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Modified prologue to conform to standards.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+package LA140010_0 is
+ TC_Var : integer := -10;
+end LA140010_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140020.a b/gcc/testsuite/ada/acats/tests/l/la140020.a
new file mode 100644
index 000000000..6b49ca2d1
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140020.a
@@ -0,0 +1,60 @@
+-- LA140020.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140021.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140021.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140021.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140020.A
+-- LA140021.AM
+-- LA140022.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140021.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA140020_0 is
+ procedure P (TC_change : out integer);
+
+ TC_Var : integer := 100;
+end LA140020_0;
+
+package body LA140020_0 is
+ procedure P (TC_change : out integer) is
+ begin
+ TC_change := TC_Var;
+ end P;
+end LA140020_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140021.am b/gcc/testsuite/ada/acats/tests/l/la140021.am
new file mode 100644
index 000000000..963e17137
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140021.am
@@ -0,0 +1,98 @@
+-- LA140021.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a unit depends on a package whose
+-- declaration is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles the specification of a package containing
+-- the specification of a procedure. Then it compiles the body
+-- of the package containing the body of the procedure and the
+-- main test procedure. The main procedure withs the first
+-- package and calls the procedure in the first package. Then,
+-- the withed package specification is changed and recompiled.
+-- Unless automatic recompilation is supported, this test should
+-- fail to link. Otherwise, the test should recompile the package
+-- body and main procedure, link the correct versions of the unit,
+-- and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140020 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140021 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140022 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140020.A
+-- -> LA140021.AM
+-- LA140022.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140020_0 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007J baseline version
+-- 08 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Changed unit and file names to conform to
+-- coding conventions.
+-- 07 DEC 96 SAIC Moved LA140020_0 to a separate file.
+--
+--!
+
+with Report; use Report;
+with LA140020_0;
+
+procedure LA140021 is
+ TC_Val : integer := 0;
+begin
+ Test ("LA14002", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a unit depends on a package whose " &
+ "declaration is changed");
+
+ LA140020_0.P (TC_Val);
+ if TC_Val = 100 then
+ Failed ("Changed unit not used");
+ elsif TC_Val /= -10 then
+ Failed ("Incorrect test value");
+ end if;
+
+ Result;
+end LA140021;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140022.a b/gcc/testsuite/ada/acats/tests/l/la140022.a
new file mode 100644
index 000000000..75a4c4483
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140022.a
@@ -0,0 +1,66 @@
+-- LA140022.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140021.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140021.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140021.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140020.A
+-- LA140021.AM
+-- -> LA140022.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140021.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007J baseline version
+-- 08 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization. Added body for unit to
+-- allow automatic recompilation.
+--
+--!
+
+package LA140020_0 is
+ procedure P (TC_change : out integer);
+
+ TC_Var : integer := -10;
+end LA140020_0;
+
+package body LA140020_0 is
+ procedure P (TC_change : out integer) is
+ begin
+ TC_change := TC_Var;
+ end P;
+end LA140020_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140030.a b/gcc/testsuite/ada/acats/tests/l/la140030.a
new file mode 100644
index 000000000..82d97e787
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140030.a
@@ -0,0 +1,57 @@
+-- LA140030.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140032.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140032.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140032.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- => LA140030.A
+-- LA140031.A
+-- LA140032.AM
+-- LA140033.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140032.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007K baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions.
+--
+--!
+
+package LA140030 is
+ TC_named_number : constant := 100;
+ TC_Var : integer := 100;
+end LA140030;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140031.a b/gcc/testsuite/ada/acats/tests/l/la140031.a
new file mode 100644
index 000000000..250162b28
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140031.a
@@ -0,0 +1,66 @@
+-- LA140031.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140032.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140032.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140032.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140030.A
+-- => LA140031.A
+-- LA140032.AM
+-- LA140033.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140032.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007K baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions.
+--
+--!
+
+package LA140031 is
+ procedure P (TC_Change : out integer);
+end LA140031;
+
+with LA140030; -- when LA140030 is revised and recompiled,
+ -- this semantic dependency has to be handled
+
+package body LA140031 is
+ procedure P (TC_Change : out integer) is
+ begin
+ TC_Change := LA140030.TC_Var;
+ end P;
+end LA140031;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140032.am b/gcc/testsuite/ada/acats/tests/l/la140032.am
new file mode 100644
index 000000000..89984be12
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140032.am
@@ -0,0 +1,101 @@
+-- LA140032.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a package body depends on a package
+-- specification that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package specification, then a second
+-- package specification and body that withs the first package,
+-- followed by a procedure that makes a call to a procedure
+-- contained inside the second package. Then, the first
+-- package specification is recompiled, making the body of
+-- package LA140031 obsolete. Unless automatic recompilation
+-- is supported this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140030 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140031 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140032 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140033 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140030.A
+-- LA140031.A
+-- => LA140032.AM
+-- LA140033.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140031 is missing or obsolete, and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007K baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Changed main program name and prologue
+-- to conform to coding conventions.
+--
+--!
+
+
+with Report; use Report;
+with LA140031;
+procedure LA140032 is
+ TC_Val : integer := 0;
+begin
+ Test ("LA14003", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a package body " &
+ "depends on a package specification that " &
+ "is changed");
+
+ LA140031.P (TC_Val);
+
+ if TC_Val = 100 then
+ Failed ("Obsolete unit elaborated");
+ elsif TC_Val /= -10 then
+ Failed ("Incorrect test value");
+ end if;
+
+ Result;
+end LA140032;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140033.a b/gcc/testsuite/ada/acats/tests/l/la140033.a
new file mode 100644
index 000000000..9d7f13366
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140033.a
@@ -0,0 +1,56 @@
+-- LA140033.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140032.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140032.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140032.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140030.A
+-- LA140031.A
+-- LA140032.AM
+-- => LA140033.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140032.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007K baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 16 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions.
+--
+--!
+
+package LA140030 is
+ TC_Var : integer := -10;
+end LA140030;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140040.a b/gcc/testsuite/ada/acats/tests/l/la140040.a
new file mode 100644
index 000000000..eef6d9874
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140040.a
@@ -0,0 +1,52 @@
+-- LA140040.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140041.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140041.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140041.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140040.A
+-- LA140041.AM
+-- LA140042.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140041.AM.
+--
+-- CHANGE HISTORY:
+-- 09 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+package LA14004_0 is
+ TC_Var : integer := 100;
+end LA14004_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140041.am b/gcc/testsuite/ada/acats/tests/l/la140041.am
new file mode 100644
index 000000000..00470b2e2
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140041.am
@@ -0,0 +1,108 @@
+-- LA140041.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic function depends on a
+-- library level package.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package specification, then a generic
+-- function specification and body that withs the package,
+-- followed by a procedure that makes a call to an instance of
+-- the generic function. Then, the package specification is
+-- recompiled, making the body of function LA14004_1 obsolete.
+-- Unless automatic recompilation is supported this test should fail
+-- to link. Otherwise, the test should recompile and link
+-- the correct version of the withed package and report
+-- "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140040 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140041 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140042 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140040.A
+-- -> LA140041.AM
+-- LA140042.A
+--
+-- PASS/FAIL CRITERIA:
+-- Expect a link-time error message that the body of generic
+-- function LA14004_1 is missing or obsolete. If automatic
+-- recompilation is supported, and an executable image is
+-- built, expect a "PASSED" message from execution.
+--
+-- CHANGE HISTORY:
+-- 09 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+generic
+function LA14004_1 return integer;
+
+with LA14004_0; -- Revision and recompilation of LA14004_0
+ -- will require resolution of this semantic
+ -- dependency
+function LA14004_1 return integer is
+begin
+ return LA14004_0.TC_Var;
+end LA14004_1;
+
+
+
+with Report; use Report;
+with LA14004_1;
+procedure LA140041 is
+ TC_Val : integer := 0;
+
+ function F_LA14004_1 is new LA14004_1;
+begin
+ Test ("LA14004", "Check that a compilation unit may " &
+ "not depend semantically on two " &
+ "different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a generic function depends on a "&
+ "library level package");
+
+ TC_Val := F_LA14004_1;
+
+ if TC_Val = 100 then
+ Failed ("Obsolete unit used in elaboration");
+ elsif TC_Val /= -10 then
+ Failed ("Incorrect test value returned");
+ end if;
+
+ Result;
+end LA140041;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140042.a b/gcc/testsuite/ada/acats/tests/l/la140042.a
new file mode 100644
index 000000000..bb4ba6c09
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140042.a
@@ -0,0 +1,53 @@
+-- LA140042.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140041.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140041.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140041.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140040.A
+-- LA140041.AM
+-- -> LA140042.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140041.AM.
+--
+-- CHANGE HISTORY:
+-- 09 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+package LA14004_0 is
+ Small_array : array (1..15) of integer;
+ TC_Var : integer := -10;
+end LA14004_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140050.a b/gcc/testsuite/ada/acats/tests/l/la140050.a
new file mode 100644
index 000000000..542c1ffdd
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140050.a
@@ -0,0 +1,60 @@
+-- LA140050.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140052.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140052.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140052.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140050.A
+-- LA140051.A
+-- LA140052.AM
+-- LA140053.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140052.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+generic
+ hi : integer;
+ lo : integer;
+ type flt is digits <>;
+package LA14005_0 is
+ TC_var : flt := flt(lo);
+ type gen_flt is new flt range flt(lo)..flt(hi);
+ max : integer := hi;
+ min : integer := lo;
+ avg : integer := (hi + lo)/ (integer(2.0));
+end LA14005_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140051.a b/gcc/testsuite/ada/acats/tests/l/la140051.a
new file mode 100644
index 000000000..6af550a3a
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140051.a
@@ -0,0 +1,56 @@
+-- LA140051.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140052.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140052.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140052.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140050.A
+-- -> LA140051.A
+-- LA140052.AM
+-- LA140053.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140052.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+with LA14005_0;
+generic
+ with package types is new LA14005_0 (<>);
+package LA14005_1 is
+ TC_constant_flt : constant types.gen_flt := types.gen_flt(types.avg);
+ function return_flt return types.gen_flt;
+end LA14005_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140052.am b/gcc/testsuite/ada/acats/tests/l/la140052.am
new file mode 100644
index 000000000..8e6c59eb8
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140052.am
@@ -0,0 +1,110 @@
+-- LA140052.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically on two
+-- different versions of the same compilation unit. Check the case
+-- where a generic package body depends on a generic package
+-- specification.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package specification and body,
+-- followed by a procedure that makes a call to a procedure
+-- contained inside the generic package. Then, the generic package
+-- specification is recompiled, making the body of the generic
+-- package obsolete. Unless automatic recompilation is
+-- supported this test should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the units and report
+-- "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140050 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140051 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140052 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140053 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140050.A
+-- LA140051.A
+-- -> LA140052.AM
+-- LA140053.A
+--
+-- PASS/FAIL CRITERIA:
+-- Expect a link-time error message that the body of generic
+-- package LA14005_1 is missing or obsolete. If automatic
+-- recompilation is supported, and an executable image is
+-- built, expect a "PASSED" message from execution.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008I baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 08 NOV 96 SAIC Unit naming correction
+-- 07 DEC 96 SAIC Moved spec of LA14005_1 to a separate file.
+--
+--!
+
+package body LA14005_1 is
+ function return_flt return types.gen_flt is
+ begin
+ return types.gen_flt(types.TC_var);
+ end return_flt;
+begin
+ types.TC_var := types.flt(TC_constant_flt);
+end LA14005_1;
+
+ ---------------------------------------------------------
+
+with Report; use Report;
+with LA14005_0;
+with LA14005_1;
+procedure LA140052 is
+ subtype TC_flt is float digits 5;
+
+ package Y is new LA14005_0 (integer(100.0), integer(0.0), TC_flt);
+ package inst is new LA14005_1 (Y);
+ TC_var : TC_flt;
+begin
+ Test ("LA14005", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of the same " &
+ "compilation unit. Check the case where a generic package " &
+ "body depends on a generic package specification");
+
+ TC_var := TC_flt(inst.return_flt);
+
+ if TC_Var /= TC_flt(Y.min) then
+ Failed ("Obsolete unit used in elaboration");
+ end if;
+
+ Result;
+end LA140052;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140053.a b/gcc/testsuite/ada/acats/tests/l/la140053.a
new file mode 100644
index 000000000..406b3abb0
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140053.a
@@ -0,0 +1,60 @@
+-- LA140053.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140052.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140052.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140052.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140050.A
+-- LA140051.A
+-- LA140052.AM
+-- -> LA140053.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140052.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008I baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+with LA14005_0;
+generic
+ with package types is new LA14005_0 (<>);
+package LA14005_1 is
+ TC_constant_flt : constant
+ types.gen_flt := types.gen_flt(types.min); --changed line
+ function return_flt return types.gen_flt;
+end LA14005_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140060.a b/gcc/testsuite/ada/acats/tests/l/la140060.a
new file mode 100644
index 000000000..4f54da1e6
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140060.a
@@ -0,0 +1,54 @@
+-- LA140060.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140062.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140062.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140062.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140060.A
+-- LA140061.A
+-- LA140062.AM
+-- LA140063.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140062.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA14006_types is
+ type t_type is tagged record
+ f : integer := 87;
+ end record;
+end LA14006_types;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140061.a b/gcc/testsuite/ada/acats/tests/l/la140061.a
new file mode 100644
index 000000000..40ff151cb
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140061.a
@@ -0,0 +1,66 @@
+-- LA140061.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140062.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140062.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140062.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140060.A
+-- -> LA140061.A
+-- LA140062.AM
+-- LA140063.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140062.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+with LA14006_types;
+use LA14006_types;
+generic
+ type t is new t_type with private;
+package LA14006_0 is
+
+ type T2 is new t with record
+ g : integer := 100;
+ end record;
+
+ TC_var : T2;
+
+private
+ type type_t is new t with record
+ g2 : integer := 99;
+ end record;
+end LA14006_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140062.am b/gcc/testsuite/ada/acats/tests/l/la140062.am
new file mode 100644
index 000000000..9cfb8ddf2
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140062.am
@@ -0,0 +1,135 @@
+-- LA140062.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic package depends on another
+-- generic package specification.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package specification, then
+-- compiles a generic package specification and body,
+-- followed by a procedure that makes a call to a procedure
+-- contained inside the second generic package. Then, the
+-- first generic package specification is recompiled,
+-- making the body of the generic package LA140060 obsolete.
+-- Unless automatic recompilation is supported this test should
+-- fail to link. Otherwise, the test should recompile and link
+-- the correct version of the units and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140060 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140061 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140062 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140063 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140060.A
+-- LA140061.A
+-- -> LA140062.AM
+-- LA140063.A
+--
+-- PASS/FAIL CRITERIA:
+-- Expect a link-time error message that the body of generic
+-- package LA14006_1 is missing or obsolete. If automatic
+-- recompilation is supported, and an executable image is
+-- built, expect a "PASSED" message from execution.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008K baseline version
+-- 09 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Moved LA14006_0 to a separate file. Added
+-- pragma Elaborate to context clause of LA14006_2.
+--
+--!
+
+with LA14006_0;
+with LA14006_types;
+use LA14006_types;
+generic
+ type additional is (<>);
+ add_val : additional;
+package LA14006_1 is
+ type T3 is new t_type with record
+ h: additional := add_val;
+ end record;
+
+ procedure P (TC_Change : out integer);
+
+ package inst is new LA14006_0 (T3);
+end LA14006_1;
+
+----------------------------------------------------------------
+
+package body LA14006_1 is
+ procedure P (TC_Change : out integer) is
+ begin
+ TC_Change := inst.TC_Var.g;
+ end P;
+end LA14006_1;
+
+----------------------------------------------------------------
+
+with LA14006_1;
+pragma Elaborate (LA14006_1);
+package LA14006_2 is new LA14006_1 (integer, 300);
+
+----------------------------------------------------------------
+
+with Report; use Report;
+with LA14006_2;
+procedure LA140062 is
+ TC_Val : integer := 0;
+begin
+ Test ("LA14006", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a generic package " &
+ "depends on another generic package " &
+ "specification");
+
+ LA14006_2.P (TC_Val);
+
+ if TC_Val = 100 then
+ Failed ("Obsolete unit used in elaboration");
+ elsif TC_Val /= -10 then
+ Failed ("Incorrect test value received");
+ end if;
+
+ Result;
+end LA140062;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140063.a b/gcc/testsuite/ada/acats/tests/l/la140063.a
new file mode 100644
index 000000000..e4e6457d0
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140063.a
@@ -0,0 +1,70 @@
+-- LA140063.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140062.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140062.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140062.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140060.A
+-- LA140061.A
+-- LA140062.AM
+-- -> LA140063.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140062.AM.
+--
+-- CHANGE HISTORY:
+-- 09 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+with LA14006_types;
+use LA14006_types;
+generic
+ type t is new t_type with private;
+package LA14006_0 is
+ type T2 is new t with record
+ g : integer := -10;
+ end record;
+
+ TC_var : T2;
+ Other_var : integer := 12;
+
+ private
+ type type_t is new t with record
+ g2 : integer := 88;
+ end record;
+end LA14006_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140070.a b/gcc/testsuite/ada/acats/tests/l/la140070.a
new file mode 100644
index 000000000..e3c864ac4
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140070.a
@@ -0,0 +1,62 @@
+-- LA140070.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140072.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140072.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140072.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140070.A
+-- LA140071.A
+-- LA140072.AM
+-- LA140073.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140072.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007L baseline version
+-- 12 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14007_0 is -- this will be modified and recompiled
+ type mod_16 is new integer;
+ type rec is tagged record
+ f: mod_16 := 12;
+ end record;
+ type t_rec is new rec with record
+ g : mod_16 := -2;
+ end record;
+ TC_Var : t_rec;
+end LA14007_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140071.a b/gcc/testsuite/ada/acats/tests/l/la140071.a
new file mode 100644
index 000000000..e895b8744
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140071.a
@@ -0,0 +1,72 @@
+-- LA140071.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140072.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140072.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140072.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140070.A
+-- -> LA140071.A
+-- LA140072.AM
+-- LA140073.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140072.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007L baseline version
+-- 12 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions. Deleted extraneous procedure
+-- specification.
+--
+--!
+
+procedure LA14007_1 (TC_Parent : in out integer);
+
+ --================================================================--
+
+procedure LA14007_1 (TC_Parent : in out integer) is
+ procedure LA14007_2 (TC_Local : in out integer) is separate;
+begin
+ LA14007_2 (TC_Parent);
+end LA14007_1;
+
+ --================================================================--
+
+with LA14007_0;
+
+separate (LA14007_1)
+procedure LA14007_2 (TC_Local : in out integer) is
+begin
+ TC_Local := integer (LA14007_0.TC_Var.f);
+end LA14007_2;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140072.am b/gcc/testsuite/ada/acats/tests/l/la140072.am
new file mode 100644
index 000000000..86ef201fe
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140072.am
@@ -0,0 +1,102 @@
+-- LA140072.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a separate procedure body depends on
+-- a non-generic package specification that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package specification, a procedure,
+-- the separate procedure body and a main procedure that
+-- withs the first package. Then, a new version of the
+-- first package specification is compiled (in a separate
+-- file, simulating editing and modification of the unit).
+-- Unless automatic recompilation is supported, this test
+-- should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the withed
+-- package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140070 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140071 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140072 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140073 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140070.A
+-- LA140071.A
+-- -> LA140072.AM
+-- LA140073.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14007_1.LA14007_2 is missing or obsolete and no executable
+-- image results. The test also passes if an executable image is
+-- produced and reports "PASSED" (in the case where the implementation
+-- supports automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007L baseline version
+-- 12 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+
+with Report; use Report;
+with LA14007_1;
+
+procedure LA140072 is
+ TC_Val : integer := 0;
+begin
+ Test ("LA14007", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a separate procedure " &
+ "body depends on a non-generic package " &
+ "specification that is changed");
+
+ LA14007_1 (TC_Val);
+
+ if TC_Val = 12 then
+ Failed ("Obsolete unit used in elaboration");
+ elsif TC_Val /= 3 then
+ Failed ("Incorrect test value returned");
+ end if;
+
+ Result;
+end LA140072;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140073.a b/gcc/testsuite/ada/acats/tests/l/la140073.a
new file mode 100644
index 000000000..01e071519
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140073.a
@@ -0,0 +1,63 @@
+-- LA140073.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140072.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140072.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140072.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140070.A
+-- LA140071.A
+-- LA140072.AM
+-- -> LA140073.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140072.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007L baseline version
+-- 12 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14007_0 is -- this is the corrected version
+ extra_integer : integer;
+ type mod_16 is new integer;
+ type rec is tagged record
+ f: mod_16 := 3;
+ end record;
+ type t_rec is new rec with record
+ null;
+ end record;
+ TC_Var : t_rec;
+end LA14007_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140080.a b/gcc/testsuite/ada/acats/tests/l/la140080.a
new file mode 100644
index 000000000..506c18251
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140080.a
@@ -0,0 +1,52 @@
+-- LA140080.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140082.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140082.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140082.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140080.A
+-- LA140081.A
+-- LA140082.AM
+-- LA140083.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140082.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007M baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+function LA14008_0 return integer;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140081.a b/gcc/testsuite/ada/acats/tests/l/la140081.a
new file mode 100644
index 000000000..b800da799
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140081.a
@@ -0,0 +1,63 @@
+-- LA140081.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140082.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140082.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140082.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140080.A
+-- -> LA140081.A
+-- LA140082.AM
+-- LA140083.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140082.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007M baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+function LA14008_0 return integer is
+ TC_local : integer := 0;
+ TC_var : integer := 100;
+
+ function LA14008_1 return integer is separate;
+ -- when LA14008_0 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+begin
+ TC_local := LA14008_1;
+ return TC_local;
+end LA14008_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140082.am b/gcc/testsuite/ada/acats/tests/l/la140082.am
new file mode 100644
index 000000000..fc34a466c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140082.am
@@ -0,0 +1,106 @@
+-- LA140082.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a subunit function body depends
+-- on a unit that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a function, separate subunit function
+-- body, and a procedure that withs the function. Then,
+-- a new version of the parent function is compiled (in a separate
+-- file, simulating and editing modification to the package).
+-- Unless automatic recompilation is supported, this
+-- test should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the withed package
+-- and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140080 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140081 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140082 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140083 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140080.A
+-- LA140081.A
+-- -> LA140082.AM
+-- LA140083.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14008_0.LA14008_1 is missing or obsolete and no executable image
+-- results. The test passes if an executable image is produced
+-- and reports "PASSED" (in case the implementation supports
+-- automatic recompilation).
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007M baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+separate (LA14008_0)
+
+function LA14008_1 return integer is
+begin
+ return LA14008_0.TC_var;
+end LA14008_1;
+
+ --==================================================================--
+
+with Report; use Report;
+with LA14008_0;
+
+procedure LA140082 is
+ TC_val : integer := 0;
+begin
+ Test ("LA14008", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a subunit function body depends on a " &
+ "unit that is changed");
+
+ TC_val := LA14008_0;
+
+ if TC_val = 100 then
+ Failed ("Revised unit not used");
+ elsif TC_val /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140082;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140083.a b/gcc/testsuite/ada/acats/tests/l/la140083.a
new file mode 100644
index 000000000..cad1cf311
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140083.a
@@ -0,0 +1,61 @@
+-- LA140083.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140082.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140082.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140082.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140080.A
+-- LA140081.A
+-- LA140082.AM
+-- -> LA140083.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140082.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007M baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 10 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+
+function LA14008_0 return integer is
+ Another_var : integer := 1000;
+ TC_local : integer := 0;
+ TC_var : integer := -10;
+
+ function LA14008_1 return integer is separate;
+
+begin
+ TC_local := LA14008_1;
+ return TC_local;
+end LA14008_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140090.a b/gcc/testsuite/ada/acats/tests/l/la140090.a
new file mode 100644
index 000000000..d2e02c714
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140090.a
@@ -0,0 +1,60 @@
+-- LA140090.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140092.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140092.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140092.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140090.A
+-- LA140091.A
+-- LA140092.AM
+-- LA140093.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140092.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007N baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+package LA14009_0 is
+
+ package LA14009_1 is
+
+ procedure P (TC_local : in out integer);
+
+ end LA14009_1;
+
+end LA14009_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140091.a b/gcc/testsuite/ada/acats/tests/l/la140091.a
new file mode 100644
index 000000000..550b908fb
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140091.a
@@ -0,0 +1,60 @@
+-- LA140091.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140092.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140092.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140092.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140090.A
+-- -> LA140091.A
+-- LA140092.AM
+-- LA140093.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140092.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007N baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+package body LA14009_0 is
+ TC_var : integer := 100;
+
+ package body LA14009_1 is separate;
+ -- when LA14009_0 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+end LA14009_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140092.am b/gcc/testsuite/ada/acats/tests/l/la140092.am
new file mode 100644
index 000000000..a4f248f95
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140092.am
@@ -0,0 +1,110 @@
+-- LA140092.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a subunit package body depends
+-- on a unit that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package, separate subunit package
+-- body, and a procedure that withs the package. Then,
+-- a new version of the package is compiled (in a separate
+-- file, simulating and editing modification to the package).
+-- Unless automatic recompilation is supported, this
+-- test should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the withed package
+-- and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140090 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140091 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140092 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140093 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140090.A
+-- LA140091.A
+-- -> LA140092.AM
+-- LA140093.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14009_0.LA14009_1 is missing or obsolete and no executable image
+-- results. The test passes if an executable image is produced
+-- and reports "PASSED" (in case the implementation supports
+-- automatic recompilation).
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007N baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+separate (LA14009_0)
+
+package body LA14009_1 is
+
+ procedure P (TC_local : in out integer) is
+ begin
+ TC_local := LA14009_0.TC_var;
+ end P;
+
+end LA14009_1;
+
+
+
+with Report; use Report;
+with LA14009_0;
+
+procedure LA140092 is
+ TC_val : integer := 0;
+begin
+ Test ("LA14009", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of the " &
+ "same compilation unit. Check the case where " &
+ "a subunit package body depends on a unit that " &
+ "is changed");
+
+ LA14009_0.LA14009_1.P(TC_Val);
+
+ if TC_val = 100 then
+ Failed ("Revised package body not used");
+ elsif TC_val /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140092;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140093.a b/gcc/testsuite/ada/acats/tests/l/la140093.a
new file mode 100644
index 000000000..375570675
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140093.a
@@ -0,0 +1,59 @@
+-- LA140093.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140092.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140092.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140092.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140090.A
+-- LA140091.A
+-- LA140092.AM
+-- -> LA140093.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140092.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007N baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+package body LA14009_0 is
+ New_TC_var : integer := 50;
+ Dummy_array : array (1..100) of boolean := (others => False);
+ TC_var : constant integer := -10;
+
+ package body LA14009_1 is separate;
+
+end LA14009_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140100.a b/gcc/testsuite/ada/acats/tests/l/la140100.a
new file mode 100644
index 000000000..dfa786966
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140100.a
@@ -0,0 +1,56 @@
+-- LA140100.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140102.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140102.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140102.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140100.A
+-- LA140101.A
+-- LA140102.AM
+-- LA140103.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140102.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008O baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14010_0 is
+ delta_v : integer := 1;
+end LA14010_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140101.a b/gcc/testsuite/ada/acats/tests/l/la140101.a
new file mode 100644
index 000000000..332f5ff20
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140101.a
@@ -0,0 +1,89 @@
+-- LA140101.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140102.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140102.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140102.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140100.A
+-- -> LA140101.A
+-- LA140102.AM
+-- LA140103.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140102.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008O baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified prologue to conform to coding
+-- conventions. Changed task to task type.
+--
+--!
+
+generic
+ type scalar is range <>;
+package LA14010_1 is
+ procedure inc (param : in out scalar);
+end LA14010_1;
+
+with LA14010_0;
+use LA14010_0;
+
+package body LA14010_1 is
+ procedure inc (param : in out scalar) is
+ begin
+ for i in 1..delta_v loop
+ param := param + 1;
+ end loop;
+ end inc;
+
+ task type inc_task is
+ entry increment (param : in out scalar);
+ end inc_task;
+
+ task body inc_task is separate;
+end LA14010_1;
+
+
+separate (LA14010_1)
+
+task body inc_task is
+ static_zero : integer := 0;
+begin
+ accept increment (param : in out scalar) do
+ static_zero := LA14010_0.delta_v + static_zero;
+ static_zero := static_zero - LA14010_0.delta_v;
+ inc (param);
+ end increment;
+end inc_task;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140102.am b/gcc/testsuite/ada/acats/tests/l/la140102.am
new file mode 100644
index 000000000..7feb2efea
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140102.am
@@ -0,0 +1,104 @@
+-- LA140102.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a task body depends on a package
+-- specification.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package spec, a generic package
+-- with a body containing a task with a body that withs the
+-- first package spec, and a main procedure that withs the
+-- generic package and calls the task. Then, a new version
+-- of the package spec is compiled (in a separate file, simulating
+-- editing and modification of the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the package spec and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140100 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140101 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140102 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140103 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140100.A
+-- LA140101.A
+-- -> LA140102.AM
+-- LA140103.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14010_1.INC_TASK is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008O baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14010_1;
+
+procedure LA140102 is
+ subtype scalar_type is integer range 0..100;
+ TC_val : scalar_type := 0;
+ package Gen_pack is new LA14010_1(scalar_type);
+begin
+ Test ("LA14010", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a task body depends " &
+ "on a package specification");
+
+ Gen_pack.inc(TC_val);
+
+ if TC_val = 1 then
+ Failed ("Old package specification used");
+ elsif TC_val /= 10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140102;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140103.a b/gcc/testsuite/ada/acats/tests/l/la140103.a
new file mode 100644
index 000000000..a16d7debf
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140103.a
@@ -0,0 +1,58 @@
+-- LA140103.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140102.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140102.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140102.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140100.A
+-- LA140101.A
+-- LA140102.AM
+-- -> LA140103.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140102.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008O baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14010_0 is
+ New_var : integer := 100;
+ Local_array : array (1..51) of integer;
+ delta_v : constant integer := 10;
+end LA14010_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140110.a b/gcc/testsuite/ada/acats/tests/l/la140110.a
new file mode 100644
index 000000000..3f69c92a9
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140110.a
@@ -0,0 +1,64 @@
+-- LA140110.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140112.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140112.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140112.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140110.A
+-- LA140111.A
+-- LA140112.AM
+-- LA140113.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140112.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007P baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+
+procedure LA14011_0 (Change_this : in out integer);
+
+
+procedure LA14011_0 (Change_this : in out integer) is
+begin
+ if Change_this = 10 then
+ Change_this := 100;
+ else
+ Change_this := 50;
+ end if;
+end LA14011_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140111.a b/gcc/testsuite/ada/acats/tests/l/la140111.a
new file mode 100644
index 000000000..c3a1cf1a1
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140111.a
@@ -0,0 +1,62 @@
+-- LA140111.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140112.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140112.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140112.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140110.A
+-- -> LA140111.A
+-- LA140112.AM
+-- LA140113.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140112.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007P baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+
+with LA14011_0;
+
+procedure LA14011_1 (Change_this1 : in out integer);
+
+
+procedure LA14011_1 (Change_this1 : in out integer) is
+begin
+ LA14011_0(Change_this1);
+end LA14011_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140112.am b/gcc/testsuite/ada/acats/tests/l/la140112.am
new file mode 100644
index 000000000..36dc8ff12
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140112.am
@@ -0,0 +1,103 @@
+-- LA140112.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library procedure depends
+-- on a unit that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a procedure, a procedure that withs
+-- the first procedure, and a procedure that withs the second
+-- procedure. Then, a new version of the first procedure is
+-- compiled (in a separate file, simulating an editing
+-- modification to the package). Unless automatic recompilation
+-- is supported, this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140110 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140111 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140112 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140113 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140110.A
+-- LA140111.A
+-- -> LA140112.AM
+-- LA140113.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14011_1 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007P baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+
+with Report; use Report;
+with LA14011_1; -- when LA14011_0 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+
+procedure LA140112 is
+ TC_val : integer := 10;
+begin
+ Test ("LA14011", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a library procedure depends on a unit " &
+ "that is changed");
+
+ LA14011_1(TC_val);
+
+ if TC_val = 100 then
+ Failed ("Revised procedure not used");
+ elsif TC_val /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140112;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140113.a b/gcc/testsuite/ada/acats/tests/l/la140113.a
new file mode 100644
index 000000000..8dd9683e3
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140113.a
@@ -0,0 +1,59 @@
+-- LA140113.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140112.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140112.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140112.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140110.A
+-- LA140111.A
+-- LA140112.AM
+-- -> LA140113.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140112.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007P baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+procedure LA14011_0 (Change_this : in out integer);
+
+
+procedure LA14011_0 (Change_this : in out integer) is
+begin
+ Change_this := -Change_this;
+end LA14011_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140120.a b/gcc/testsuite/ada/acats/tests/l/la140120.a
new file mode 100644
index 000000000..d21525ed4
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140120.a
@@ -0,0 +1,63 @@
+-- LA140120.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140122.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140122.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140122.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140120.A
+-- LA140121.A
+-- LA140122.AM
+-- LA140123.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140122.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007Q baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+function LA14012_0 (Parm_1 : integer) return integer;
+
+
+function LA14012_0 (Parm_1 : integer) return integer is
+begin
+ if Parm_1 >= 0 then
+ return 100;
+ else
+ return 200;
+ end if;
+end LA14012_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140121.a b/gcc/testsuite/ada/acats/tests/l/la140121.a
new file mode 100644
index 000000000..e4ea3ed9a
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140121.a
@@ -0,0 +1,64 @@
+-- LA140121.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140122.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140122.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140122.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140120.A
+-- -> LA140121.A
+-- LA140122.AM
+-- LA140123.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140122.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007Q baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+
+with LA14012_0;
+
+function LA14012_1 return integer;
+
+
+function LA14012_1 return integer is
+ Local_val : integer := 5;
+begin
+ Local_val := LA14012_0 (Parm_1 => Local_val);
+ return Local_val;
+end LA14012_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140122.am b/gcc/testsuite/ada/acats/tests/l/la140122.am
new file mode 100644
index 000000000..06cacb3e6
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140122.am
@@ -0,0 +1,102 @@
+-- LA140122.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level function depends
+-- on a unit that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a function, a function that withs
+-- the first function, and a procedure that withs the second
+-- function. Then, a new version of the first function is
+-- compiled (in a separate file, simulating an editing
+-- modification to the package). Unless automatic recompilation
+-- is supported, this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140120 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140121 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140122 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140123 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140120.A
+-- LA140121.A
+-- -> LA140122.AM
+-- LA140123.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14012_1 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007Q baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14012_1; -- when LA14012_0 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+
+procedure LA140122 is
+ TC_local : integer := 5;
+begin
+ Test ("LA14012", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a library level function depends on a " &
+ "unit that is changed");
+
+ TC_local := LA14012_1;
+
+ if TC_local = 100 then
+ Failed ("Revised function not used");
+ elsif TC_local /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140122;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140123.a b/gcc/testsuite/ada/acats/tests/l/la140123.a
new file mode 100644
index 000000000..cacbf64e4
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140123.a
@@ -0,0 +1,59 @@
+-- LA140123.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140122.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140122.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140122.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140120.A
+-- LA140121.A
+-- LA140122.AM
+-- -> LA140123.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140122.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007Q baseline version
+-- 25 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+function LA14012_0 (Parm_1 : integer) return integer;
+
+
+function LA14012_0 (Parm_1 : integer) return integer is
+begin
+ return -(2 * Parm_1);
+end LA14012_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140130.a b/gcc/testsuite/ada/acats/tests/l/la140130.a
new file mode 100644
index 000000000..a65ce8001
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140130.a
@@ -0,0 +1,57 @@
+-- LA140130.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140132.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140132.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140132.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140130.A
+-- LA140131.A
+-- LA140132.AM
+-- LA140133.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140132.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007R baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA140130 is
+ subtype TC_type is integer range 0..100;
+ TC_var : TC_type := TC_type'last;
+end LA140130;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140131.a b/gcc/testsuite/ada/acats/tests/l/la140131.a
new file mode 100644
index 000000000..fe03f6705
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140131.a
@@ -0,0 +1,58 @@
+-- LA140131.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140132.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140132.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140132.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140130.A
+-- -> LA140131.A
+-- LA140132.AM
+-- LA140133.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140132.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007R baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+with LA140130;
+
+package LA140131 is
+ TC_local : LA140130.TC_type := LA140130.TC_var;
+end LA140131;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140132.am b/gcc/testsuite/ada/acats/tests/l/la140132.am
new file mode 100644
index 000000000..fe39257f2
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140132.am
@@ -0,0 +1,102 @@
+-- LA140132.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level package depends
+-- on a package specification that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package spec., a package that withs
+-- the first package, and a procedure that withs the second
+-- package. Then, a new version of the first package spec. is
+-- compiled (in a separate file, simulating an editing
+-- modification to the package). Unless automatic recompilation
+-- is supported, this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140130 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140131 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140132 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140133 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140130.A
+-- LA140131.A
+-- -> LA140132.AM
+-- LA140133.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140131 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007R baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA140131; -- when LA140130 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+
+procedure LA140132 is
+ TC_val : integer := 0;
+begin
+ Test ("LA14013", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a library level package depends on a " &
+ "package specification that is changed");
+
+ TC_val := LA140131.TC_local;
+
+ if TC_val = 100 then
+ Failed ("Revised package specification not used");
+ elsif TC_val /= -49 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140132;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140133.a b/gcc/testsuite/ada/acats/tests/l/la140133.a
new file mode 100644
index 000000000..4d1451e4e
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140133.a
@@ -0,0 +1,58 @@
+-- LA140133.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140132.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140132.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140132.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140130.A
+-- LA140131.A
+-- LA140132.AM
+-- -> LA140133.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140132.AM.
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007R baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA140130 is
+ subtype TC_type is integer range -49..50;
+ TC_const : constant TC_type := TC_type'first;
+ TC_var : TC_type := TC_const;
+end LA140130;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140140.a b/gcc/testsuite/ada/acats/tests/l/la140140.a
new file mode 100644
index 000000000..21168913c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140140.a
@@ -0,0 +1,55 @@
+-- LA140140.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140142.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140142.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140142.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140140.A
+-- LA140141.A
+-- LA140142.AM
+-- LA140143.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140142.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007S baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+procedure LA14014_0 (Change_one : in out integer) is
+begin
+ Change_one := Change_one * 5;
+end LA14014_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140141.a b/gcc/testsuite/ada/acats/tests/l/la140141.a
new file mode 100644
index 000000000..d0406e6e5
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140141.a
@@ -0,0 +1,57 @@
+-- LA140141.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140142.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140142.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140142.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140140.A
+-- -> LA140141.A
+-- LA140142.AM
+-- LA140143.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140142.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007S baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+with LA14014_0;
+procedure LA14014_1 (Change_this : out integer) is
+begin
+ Change_this := 10;
+ LA14014_0(Change_one => Change_this);
+end LA14014_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140142.am b/gcc/testsuite/ada/acats/tests/l/la140142.am
new file mode 100644
index 000000000..39b70dda1
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140142.am
@@ -0,0 +1,102 @@
+-- LA140142.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level procedure depends
+-- on another library level procedure that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a procedure, a procedure that withs
+-- the first procedure, and a procedure that withs the second
+-- procedure. Then, a new version of the first procedure is
+-- compiled (in a separate file, simulating and editing
+-- modification to the procedure). Unless automatic recompilation
+-- is supported, this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140140 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140141 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140142 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140143 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140140.A
+-- LA140141.A
+-- -> LA140142.AM
+-- LA140143.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14014_1 is missing or obsolete and no executable image
+-- results. The test passes if an executable image is produced
+-- and reports "PASSED" (in case the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007S baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+with Report; use Report;
+with LA14014_1; -- when LA14014_0 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+procedure LA140142 is
+ TC_val : integer := 0;
+begin
+ Test ("LA14014", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a library level procedure depends on " &
+ "another library level procedure that is changed");
+
+ LA14014_1(TC_val);
+
+ if TC_val = 50 then
+ Failed ("Revised procedure not used");
+ elsif TC_val = 70 then
+ Failed ("Revised procedure not used");
+ elsif TC_val /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140142;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140143.a b/gcc/testsuite/ada/acats/tests/l/la140143.a
new file mode 100644
index 000000000..2c21b1bef
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140143.a
@@ -0,0 +1,64 @@
+-- LA140143.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140142.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140142.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140142.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140140.A
+-- LA140141.A
+-- LA140142.AM
+-- -> LA140143.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140142.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007S baseline version
+-- 26 MAY 95 SAIC Initial version
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+--
+--!
+
+procedure LA14014_0 (Change_two : in integer := 0;
+ Change_one : out integer) is
+begin
+
+ if Change_two = 10 then
+ Change_one := 70;
+ elsif Change_two = 0 then
+ Change_one := -10;
+ else
+ Change_one := 30;
+ end if;
+
+end LA14014_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140150.a b/gcc/testsuite/ada/acats/tests/l/la140150.a
new file mode 100644
index 000000000..77a5a21a8
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140150.a
@@ -0,0 +1,56 @@
+-- LA140150.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140152.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140152.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140152.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140150.A
+-- LA140151.A
+-- LA140152.AM
+-- LA140153.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140152.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007T baseline version
+-- 06 JUN 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+function LA14015_0 (Param_1 : integer) return boolean is
+begin
+ return Param_1 = 5;
+end LA14015_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140151.a b/gcc/testsuite/ada/acats/tests/l/la140151.a
new file mode 100644
index 000000000..6cd0d1a64
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140151.a
@@ -0,0 +1,65 @@
+-- LA140151.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140152.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140152.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140152.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140150.A
+-- -> LA140151.A
+-- LA140152.AM
+-- LA140153.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140152.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007T baseline version
+-- 06 JUN 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+with LA14015_0; -- when LA140150 is revised and recompiled,
+ -- this semantic dependency has to be
+ -- handled
+
+
+function LA14015_1 (P : integer) return integer is
+begin
+ if LA14015_0 (Param_1 => P) then
+ return 100;
+ else
+ return -10;
+ end if;
+end LA14015_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140152.am b/gcc/testsuite/ada/acats/tests/l/la140152.am
new file mode 100644
index 000000000..bc9847050
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140152.am
@@ -0,0 +1,101 @@
+-- LA140152.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level function depends
+-- on another library level function that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a function, a function that withs and
+-- calls the first, and a procedure that withs the second
+-- function. Then, a new version of the first function is
+-- compiled (in a separate file, simulating an editing
+-- modification to the function). Unless automatic recompilation
+-- is supported, this test should fail to link. Otherwise, the
+-- test should recompile and link the correct version of the
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140150 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140151 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140152 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140153 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140150.A
+-- LA140151.A
+-- -> LA140152.AM
+-- LA140153.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14015_1 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007T baseline version
+-- 06 JUN 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14015_1;
+
+procedure LA140152 is
+ TC_local : integer := 5;
+begin
+ Test ("LA14015", "Check that a compilation unit may " &
+ "not depend semantically on two " &
+ "different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a library level function " &
+ "depends on another library level " &
+ "function that is changed");
+
+ TC_local := LA14015_1 (5);
+
+ if TC_local = 100 then
+ Failed ("Revised unit not used");
+ elsif TC_local /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140152;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140153.a b/gcc/testsuite/ada/acats/tests/l/la140153.a
new file mode 100644
index 000000000..812644595
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140153.a
@@ -0,0 +1,61 @@
+-- LA140153.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140152.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140152.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140152.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140150.A
+-- LA140151.A
+-- LA140152.AM
+-- -> LA140153.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140152.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007T baseline version
+-- 06 JUN 95 SAIC Initial version
+-- 17 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+function LA14015_0 (Param_2 : boolean := false;
+ Param_1 : integer := 10) return boolean is
+begin
+ if Param_2 then
+ return true;
+ else
+ return Param_1 = 10;
+ end if;
+end LA14015_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140160.a b/gcc/testsuite/ada/acats/tests/l/la140160.a
new file mode 100644
index 000000000..38c396d96
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140160.a
@@ -0,0 +1,54 @@
+-- LA140160.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140162.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140162.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140162.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140160.A
+-- LA140161.A
+-- LA140162.AM
+-- LA140163.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140162.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA14016_0 is
+ subtype status_code is integer range 0..10;
+ type tagged_type is abstract tagged null record;
+ function status (param : tagged_type) return status_code is abstract;
+end LA14016_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140161.a b/gcc/testsuite/ada/acats/tests/l/la140161.a
new file mode 100644
index 000000000..4be9f1dfd
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140161.a
@@ -0,0 +1,63 @@
+-- LA140161.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140162.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140162.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140162.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140160.A
+-- -> LA140161.A
+-- LA140162.AM
+-- LA140162.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140162.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+with LA14016_0;
+generic
+ type T is new LA14016_0.tagged_type with private;
+ type count_type is range <>;
+package LA14016_1 is
+ default_status : constant LA14016_0.status_code := 0;
+ type new_t is new T with
+ record
+ count : count_type;
+ end record;
+ function status (param : new_t) return LA14016_0.status_code;
+
+ procedure inc (param : in out new_t);
+end LA14016_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140162.am b/gcc/testsuite/ada/acats/tests/l/la140162.am
new file mode 100644
index 000000000..fd985c295
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140162.am
@@ -0,0 +1,196 @@
+-- LA140162.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a separate procedure depends
+-- on a withed generic package that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test declares a package which contains a generic procedure GP,
+-- the body of which is a subunit. The package also contains a procedure
+-- P which instantiates GP and calls the instance. The instance itself
+-- calls a procedure which is declared within the instance of a generic
+-- package X. The test compiles each of these compilation units and the
+-- main procedure, then compiles a new version of the generic package X
+-- (in a separate file, simulating an editing modification to the unit).
+-- Unless automatic recompilation is supported, this test should fail to
+-- link. Otherwise, the test should recompile and link the correct
+-- version of the generic package X and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140160 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140161 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140162 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140163 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140160.A
+-- LA140161.A
+-- -> LA140162.AM
+-- LA140163.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14016_4.gen_def is missing or obsolete and no executable
+-- image results. The test also passes if an executable image is
+-- produced and reports "PASSED" (in the case where the implementation
+-- supports automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008L baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions. Restructured subunits
+-- to prevent potential Program_Error due to
+-- premature instantiation of gen_def. Moved
+-- LA14016_1 to a separate file. Added pragma
+-- Elaborate to context clause of LA14016_3.
+--
+--
+--!
+
+package body LA14016_1 is
+ procedure inc (param : in out new_t) is
+ begin
+ param.count := param.count + 1;
+ end inc;
+ function status (param : new_t) return LA14016_0.status_code is
+ begin
+ return LA14016_0.status_code(param.count);
+ end status;
+end LA14016_1;
+
+---------------------------------------------------------
+
+with LA14016_0;
+package LA14016_2 is
+ type extended is new LA14016_0.tagged_type with
+ record
+ status : LA14016_0.status_code := 10;
+ end record;
+ function status (param : extended) return LA14016_0.status_code;
+end LA14016_2;
+
+---------------------------------------------------------
+
+package body LA14016_2 is
+ function status (param : extended) return LA14016_0.status_code is
+ begin
+ return param.status;
+ end status;
+end LA14016_2;
+
+---------------------------------------------------------
+
+with LA14016_0;
+with LA14016_1;
+with LA14016_2;
+pragma Elaborate (LA14016_1);
+package LA14016_3 is new LA14016_1 (LA14016_2.extended,
+ LA14016_0.status_code);
+
+---------------------------------------------------------
+
+with LA14016_3;
+package LA14016_4 is
+
+ procedure gen_caller (p1 : in out LA14016_3.new_t);
+
+ generic
+ new_max : integer;
+ procedure gen_def (param : in out LA14016_3.new_t);
+
+end LA14016_4;
+
+---------------------------------------------------------
+
+package body LA14016_4 is
+ procedure gen_def (param : in out LA14016_3.new_t) is separate;
+ procedure gen_caller (p1 : in out LA14016_3.new_t) is separate;
+end LA14016_4;
+
+---------------------------------------------------------
+
+separate (LA14016_4)
+procedure gen_def (param : in out LA14016_3.new_t) is
+begin
+ param.status := LA14016_3.default_status; --originally 0
+ --later change to 5
+ param.count := param.status;
+ LA14016_3.inc (param);
+end gen_def;
+
+---------------------------------------------------------
+
+separate (LA14016_4)
+procedure gen_caller (p1 : in out LA14016_3.new_t) is
+ procedure default is new gen_def (101);
+begin
+ default (p1);
+end gen_caller;
+
+---------------------------------------------------------
+
+with Report; use Report;
+with LA14016_3;
+with LA14016_4;
+with LA14016_2;
+
+procedure LA140162 is
+ E : LA14016_3.new_t; --status defaults to 10
+begin
+ Test ("LA14016","Check that a compilation unit may not depend " &
+ "semantically on two different versions of the " &
+ "same compilation unit. Check the case where a " &
+ "separate procedure depends on a withed generic " &
+ "package that is changed");
+
+ LA14016_4.gen_caller (E);
+
+ if E.status = 0 then
+ Failed ("Old generic used");
+ elsif E.status = 10 then
+ Failed ("Status not updated");
+ elsif E.status /= 5 then
+ Failed ("Wrong status value used");
+ end if;
+
+ if E.count /= 6 then
+ Failed ("Count not properly handled");
+ end if;
+
+ Result;
+end LA140162;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140163.a b/gcc/testsuite/ada/acats/tests/l/la140163.a
new file mode 100644
index 000000000..d91923a6c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140163.a
@@ -0,0 +1,67 @@
+-- LA140163.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140162.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140162.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140162.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140160.A
+-- LA140161.A
+-- LA140162.AM
+-- -> LA140163.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140162.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008L baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions and to reflect new
+-- test file organization.
+--
+--!
+
+with LA14016_0;
+generic
+ type T is new LA14016_0.tagged_type with private;
+ type count_type is range <>;
+package LA14016_1 is
+ default_status : constant LA14016_0.status_code := 5;
+ type new_t is new T with
+ record
+ count : count_type;
+ end record;
+ function status (param : new_t) return LA14016_0.status_code;
+
+ procedure inc (param : in out new_t);
+end LA14016_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140170.a b/gcc/testsuite/ada/acats/tests/l/la140170.a
new file mode 100644
index 000000000..0c041d00a
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140170.a
@@ -0,0 +1,64 @@
+-- LA140170.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140172.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140172.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140172.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140170.A
+-- LA140171.A
+-- LA140172.AM
+-- LA140173.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140172.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA14017_0 is
+ type swap_type_ptr is record
+ p_all : integer;
+ end record;
+ subtype count_type is integer;
+end LA14017_0;
+
+-----------------------------------------------------
+
+with LA14017_0;
+use LA14017_0;
+generic
+ type swap_type is private;
+function LA14017_1 (P1, P2 : swap_type_ptr;
+ count : count_type) return count_type;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140171.a b/gcc/testsuite/ada/acats/tests/l/la140171.a
new file mode 100644
index 000000000..d7f37663c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140171.a
@@ -0,0 +1,69 @@
+-- LA140171.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140172.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140172.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140172.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140170.A
+-- -> LA140171.A
+-- LA140172.AM
+-- LA140173.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140172.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+function LA14017_1 (P1, P2 : swap_type_ptr;
+ count : count_type) return count_type is
+ temp : integer := 0;
+ count_factor : count_type := 10;
+
+ function Inc (Param : integer) return integer;
+
+ function Inc (Param : integer) return integer is separate;
+
+ procedure Swap_Ptrs (P1, P2 : in out swap_type_ptr) is
+ temp : integer := 0;
+ begin
+ temp := P1.p_all;
+ P1.p_all := P2.p_all;
+ P2.p_all := temp;
+ end Swap_Ptrs;
+
+begin
+ return count_type (Inc (integer(count)));
+end LA14017_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140172.am b/gcc/testsuite/ada/acats/tests/l/la140172.am
new file mode 100644
index 000000000..67c970e5a
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140172.am
@@ -0,0 +1,121 @@
+-- LA140172.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a separate function semantically
+-- depends on a library level generic function that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic function, and a procedure that
+-- withs the function. Then, a new version of the generic
+-- function body is compiled (in a separate file, simulating
+-- and editing modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed function and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140170 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140171 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140172 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140173 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140170.A
+-- LA140171.A
+-- -> LA140172.AM
+-- LA140173.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14017_1.Inc is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008M baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 03 MAR 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Moved LA14017_1 to a separate file.
+--
+--!
+
+separate (LA14017_1) -- This dependency must be resolved
+ -- after LA140171.A is compiled.
+
+function Inc (Param : integer) return integer is
+begin
+ return Param + integer (count_factor);
+end Inc;
+
+-----------------------------------------------------
+
+
+with Report; use Report;
+with LA14017_1;
+with LA14017_0;
+
+procedure LA140172 is
+ type Access_integer is access integer;
+ TC_local : integer := 0;
+ P1, P2 : LA14017_0.swap_type_ptr;
+
+ function New_swap is new LA14017_1(swap_type => integer);
+begin
+ Test ("LA14017", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a separate " &
+ "function semantically depends on a " &
+ "library level generic function that is " &
+ "changed");
+
+ P1.p_all := 0;
+ P2 := P1;
+ TC_local := integer (New_swap(P1,P2,0));
+
+ if TC_local = 10 then
+ Failed ("Revised library level function not used");
+ elsif TC_local /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140172;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140173.a b/gcc/testsuite/ada/acats/tests/l/la140173.a
new file mode 100644
index 000000000..73f382e72
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140173.a
@@ -0,0 +1,75 @@
+-- LA140173.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140172.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140172.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140172.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140170.A
+-- LA140171.A
+-- LA140172.AM
+-- -> LA140173.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140172.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008M baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 03 MAR 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+function LA14017_1 (P1, P2 : swap_type_ptr;
+ count : count_type) return count_type is
+ count_factor : count_type := -10;
+
+ procedure Swap_Ptrs (P1, P2 : in out swap_type_ptr) is
+ temp : integer := 0;
+ begin
+ temp := P1.p_all;
+ P1.p_all := P2.p_all;
+ P2.p_all := temp;
+ end Swap_Ptrs;
+
+ function Inc (Param : integer) return integer;
+
+ function Inc (Param : integer) return integer is separate;
+
+ temp : integer := 0;
+begin
+ return count_type (Inc (integer(count)));
+end LA14017_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140180.a b/gcc/testsuite/ada/acats/tests/l/la140180.a
new file mode 100644
index 000000000..185ca21f4
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140180.a
@@ -0,0 +1,65 @@
+-- LA140180.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140182.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140182.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140182.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140180.A
+-- LA140181.A
+-- LA140182.AM
+-- LA140183.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140182.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+generic
+ type unsigned is mod <>;
+ mod_value : unsigned := 1;
+package LA14018_0 is
+ --types declared locally
+
+ generic
+ type discrete is (<>);
+ package utils_18 is
+ procedure Dec (Param : in out unsigned);
+
+ -- other utilities
+ end utils_18;
+
+ --routines that make this generic useful
+end LA14018_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140181.a b/gcc/testsuite/ada/acats/tests/l/la140181.a
new file mode 100644
index 000000000..3d9847a98
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140181.a
@@ -0,0 +1,54 @@
+-- LA140181.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140182.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140182.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140182.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140180.A
+-- -> LA140181.A
+-- LA140182.AM
+-- LA140183.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140182.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package body LA14018_0 is
+ offset : constant unsigned := mod_value;
+
+ package body utils_18 is separate;
+end LA14018_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140182.am b/gcc/testsuite/ada/acats/tests/l/la140182.am
new file mode 100644
index 000000000..c27bb541f
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140182.am
@@ -0,0 +1,118 @@
+-- LA140182.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a separate generic package body depends
+-- on a library level generic package body that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package and its body, and a
+-- procedure that withs the generic package. Then a new
+-- version of the generic package body is compiled (in a
+-- separate file, simulating and editing modification to the
+-- unit). Unless automatic recompilation is supported, this
+-- test should fail to link. Otherwise, the test should
+-- recompile and link the correct version of the with package
+-- withed package and report "PASSED" at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140180 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140181 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140182 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140183 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140180.A
+-- LA140181.A
+-- -> LA140182.AM
+-- LA140183.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14018_0.utils_18 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008N baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions. Moved instantiation
+-- of utils_18 to avoid potential Program_Error.
+-- Moved LA14018_0 to a separate file.
+--
+--!
+
+separate (LA14018_0) -- This dependency must be resolved
+ -- after LA140181.A is compiled.
+package body utils_18 is
+ procedure Dec (Param : in out unsigned) is
+ begin
+ Param := Param - offset;
+ end Dec;
+end utils_18;
+
+--------------------------------------------------------
+
+with Report; use Report;
+with LA14018_0;
+procedure LA140182 is
+ type mod_4 is mod 4; -- 0, 1, 2, 3, 0, 1,...
+ TC_var : mod_4 := 2;
+
+ package Mod_stuff is new LA14018_0 (mod_4);
+ package unsigned_utils is new Mod_stuff.utils_18 (mod_4);
+begin
+ Test ("LA14018", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. "&
+ "Check the case where a separate package " &
+ "body depends on a library level generic " &
+ "package body that is changed");
+
+ unsigned_utils.Dec (TC_var);
+
+ if TC_var = 2 then
+ Failed ("Dec routine did not work");
+ elsif TC_var = 1 then
+ Failed ("New body for LA14018_0 not used");
+ elsif TC_var /= 3 then
+ Failed ("Unexpected result produced");
+ end if;
+
+ Result;
+end LA140182;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140183.a b/gcc/testsuite/ada/acats/tests/l/la140183.a
new file mode 100644
index 000000000..f50ae15ba
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140183.a
@@ -0,0 +1,60 @@
+-- LA140183.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140182.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140182.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140182.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140180.A
+-- LA140181.A
+-- LA140182.AM
+-- -> LA140183.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140182.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008N baseline version
+-- 16 JUN 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions, and to reflect new test
+-- file organization.
+--
+--!
+
+package body LA14018_0 is
+ New_TC_var : integer := 101;
+ New_array : array (1..101) of integer := (others => 0);
+ offset : constant unsigned := mod_value + 2;
+
+ package body utils_18 is separate;
+end LA14018_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140190.a b/gcc/testsuite/ada/acats/tests/l/la140190.a
new file mode 100644
index 000000000..0c4c3a9d6
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140190.a
@@ -0,0 +1,61 @@
+-- LA140190.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140192.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140192.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140192.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140190.A
+-- LA140191.A
+-- LA140192.AM
+-- LA140193.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140192.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008P baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+procedure LA14019_0 (Param : in out integer);
+
+
+procedure LA14019_0 (Param : in out integer) is
+ TC_offset : constant integer := 1;
+begin
+ Param := Param + TC_offset;
+end LA14019_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140191.a b/gcc/testsuite/ada/acats/tests/l/la140191.a
new file mode 100644
index 000000000..8b7af2e7c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140191.a
@@ -0,0 +1,74 @@
+-- LA140191.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140192.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140192.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140192.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140190.A
+-- -> LA140191.A
+-- LA140192.AM
+-- LA140193.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140192.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008P baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+generic
+ type integer_type is range <>;
+procedure LA14019_1 (Test_val : in out integer);
+
+with LA14019_0;
+procedure LA14019_1 (Test_val : in out integer) is
+ arr : array (1..5) of integer;
+ sum : integer := 0;
+ temp_val : integer := 0;
+begin
+ arr(1) := Test_val;
+ for i in 2..arr'last loop
+ temp_val := arr(i-1);
+ LA14019_0 (temp_val);
+ arr(i) := temp_val;
+ end loop;
+ for i in 1..arr'last loop
+ sum := sum + arr(i);
+ end loop;
+ Test_val := sum;
+end LA14019_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140192.am b/gcc/testsuite/ada/acats/tests/l/la140192.am
new file mode 100644
index 000000000..c5f32905d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140192.am
@@ -0,0 +1,107 @@
+-- LA140192.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level generic procedure
+-- depends on library level procedure that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a procedure, a generic procedure that
+-- withs the first procedure and a main procedure that withs
+-- the generic procedure. Then, a new version of the
+-- procedure is compiled (in a separate file, simulating
+-- and editing modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed function and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140190 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140191 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140192 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140193 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140190.A
+-- LA140191.A
+-- -> LA140192.AM
+-- LA140193.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140192 is missing or obsolete, or that LA14019_1 is
+-- missing or obsolete (optional) and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008P baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14019_1; -- This dependency must be resolved
+ -- after LA140193 is compiled.
+
+procedure LA140192 is
+ subtype count is integer range 0..100;
+ procedure Gen_proc is new LA14019_1 (count);
+ TC_local : count := 0;
+begin
+ Test ("LA14019", "Check that a compilation unit may " &
+ "not depend semantically on two " &
+ "different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a library level generic " &
+ "procedure depends on library level " &
+ "procedure that is changed.");
+
+ Gen_proc (TC_local);
+
+ if TC_local = 10 then
+ Failed ("Revised library level procedure not used");
+ elsif TC_local /= 52 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140192;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140193.a b/gcc/testsuite/ada/acats/tests/l/la140193.a
new file mode 100644
index 000000000..717cc633b
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140193.a
@@ -0,0 +1,64 @@
+-- LA140193.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140192.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140192.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140192.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140190.A
+-- LA140191.A
+-- LA140192.AM
+-- -> LA140193.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140192.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008P baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 17 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+procedure LA14019_0 (Param : in out integer);
+
+
+procedure LA14019_0 (Param : in out integer) is
+ Local_array : array (1..10) of float := (others => 0.0);
+ Local_var : integer := 0;
+ TC_var : constant integer := -9;
+
+begin
+ Param := (1 + Param) * 2;
+end LA14019_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140200.a b/gcc/testsuite/ada/acats/tests/l/la140200.a
new file mode 100644
index 000000000..9adf75e67
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140200.a
@@ -0,0 +1,76 @@
+-- LA140200.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140202.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140202.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140202.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140200.A
+-- LA140201.A
+-- LA140202.AM
+-- LA140203.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140202.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008Q baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+-- Reworded objective. Moved instance to
+-- library-level and redesigned to use generic
+-- formal function. Fixed arithmetic errors.
+--
+--!
+
+package LA14020_0 is
+
+ subtype apples is integer range 0..100;
+ subtype oranges is integer range 0..200;
+
+ type Fruit_Basket is tagged record
+ App : apples;
+ Ora : oranges;
+ end record;
+
+end LA14020_0;
+
+ --==================================================================--
+
+package LA14020_0.LA14020_1 is
+
+ type Bigger_Basket is new Fruit_Basket with record
+ Total : integer;
+ end record;
+
+end LA14020_0.LA14020_1;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140201.a b/gcc/testsuite/ada/acats/tests/l/la140201.a
new file mode 100644
index 000000000..668225532
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140201.a
@@ -0,0 +1,71 @@
+-- LA140201.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140202.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140202.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140202.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140200.A
+-- -> LA140201.A
+-- LA140202.AM
+-- LA140203.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140202.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008Q baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+-- Reworded objective. Moved instance to
+-- library-level and redesigned to use generic
+-- formal function. Fixed arithmetic errors.
+--
+--!
+
+with LA14020_0;
+generic
+ type Basket is new LA14020_0.Fruit_Basket with private;
+function LA14020_2 (Left, Right : Basket) return Basket;
+
+ --==================================================================--
+
+function LA14020_2 (Left, Right : Basket) return Basket is
+ Result : Basket;
+begin
+ Result.App := Left.App + Left.App;
+ Result.Ora := Right.Ora + Right.Ora;
+ -- wrong algorithm, to be corrected later
+
+ return Result;
+end LA14020_2;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140202.am b/gcc/testsuite/ada/acats/tests/l/la140202.am
new file mode 100644
index 000000000..1a4ed7676
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140202.am
@@ -0,0 +1,144 @@
+-- LA140202.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a library level instance depends on
+-- a library level generic function whose body is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic function, an instance of a generic
+-- function that withs the first function and a main procedure that
+-- withs the instance. Then a new version of the first generic function
+-- is compiled (in a separate file, simulating editing and modification
+-- of the unit). Unless automatic recompilation is supported, this
+-- test should fail to link. Otherwise, the test should recompile and
+-- link the correct version of the withed function and report "PASSED"
+-- at execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140200 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140201 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140202 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140203 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140200.A
+-- LA140201.A
+-- -> LA140202.AM
+-- LA140203.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140202 is missing or obsolete, or that LA14020_3 or LA14020_4
+-- is missing or obsolete (optional) and no executable image
+-- results. The test passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation
+-- supports automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008Q baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+-- Reworded objective. Moved instance to
+-- library-level and redesigned to use generic
+-- formal function. Fixed arithmetic errors.
+--
+--!
+
+with LA14020_0.LA14020_1;
+with LA14020_2;
+pragma Elaborate (LA14020_2);
+function LA14020_3 is new LA14020_2 (LA14020_0.LA14020_1.Bigger_Basket);
+
+ --==================================================================--
+
+with LA14020_0.LA14020_1;
+generic
+ type Market_Basket is new LA14020_0.LA14020_1.Bigger_Basket with private;
+ with function "+" (L,R: Market_Basket) return Market_Basket is <>;
+function LA14020_4 (B1, B2 : Market_Basket) return Market_Basket;
+
+ --==================================================================--
+
+with LA14020_3;
+function LA14020_4 (B1, B2 : Market_Basket) return Market_Basket is
+ Result : Market_Basket;
+begin
+ Result := B1 + B2;
+ Result.Total := integer (Result.App) + integer (Result.Ora);
+ return Result;
+end LA14020_4;
+
+ --==================================================================--
+
+with Report;
+
+with LA14020_0.LA14020_1;
+with LA14020_3;
+with LA14020_4;
+
+procedure LA140202 is
+ package Child renames LA14020_0.LA14020_1;
+
+ Basket_1 : Child.Bigger_Basket := (App => 5, Ora => 20, Total => 0);
+ Basket_2 : Child.Bigger_Basket := (App => 7, Ora => 3, Total => 0);
+
+ function Total is new LA14020_4 (Child.Bigger_Basket, LA14020_3);
+begin
+ Report.Test ("LA14020", "Check that a compilation unit may " &
+ "not depend semantically on two " &
+ "different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a library level instance " &
+ "depends on a library level generic " &
+ "function whose body is changed");
+
+ Basket_1 := Total (Basket_1, Basket_2);
+
+ if Basket_1.App = 10 or
+ Basket_1.Ora = 6 or
+ Basket_1.Total = 16
+ then
+ Report.Failed ("Revised generic function not used");
+ elsif Basket_1.App /= 12 or
+ Basket_1.Ora /= 23 or
+ Basket_1.Total /= 35 then
+ Report.Failed ("Incorrect result returned");
+ end if;
+
+ Report.Result;
+end LA140202;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140203.a b/gcc/testsuite/ada/acats/tests/l/la140203.a
new file mode 100644
index 000000000..f2965b407
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140203.a
@@ -0,0 +1,71 @@
+-- LA140203.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140202.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140202.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140202.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140200.A
+-- LA140201.A
+-- LA140202.AM
+-- -> LA140203.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140202.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008Q baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 29 FEB 96 SAIC First revision after review
+-- 12 DEC 96 SAIC Reorganized to permit automatic recompilation.
+-- Reworded objective. Moved instance to
+-- library-level and redesigned to use generic
+-- formal function. Fixed arithmetic errors.
+--
+--!
+
+with LA14020_0;
+generic
+ type Basket is new LA14020_0.Fruit_Basket with private;
+function LA14020_2 (Left, Right : Basket) return Basket;
+
+ --==================================================================--
+
+function LA14020_2 (Left, Right : Basket) return Basket is
+ Result : Basket;
+begin
+ Result.App := Left.App + Right.App;
+ Result.Ora := Left.Ora + Right.Ora;
+ -- correct algorithm
+
+ return Result;
+end LA14020_2;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140210.a b/gcc/testsuite/ada/acats/tests/l/la140210.a
new file mode 100644
index 000000000..ab3ad5f77
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140210.a
@@ -0,0 +1,69 @@
+-- LA140210.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140211.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140211.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140211.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140210.A
+-- LA140211.AM
+-- LA140212.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140211.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+generic
+ type swap_type is private;
+ type int_type is range <>;
+ times : int_type :=1;
+package LA14021_0 is
+ procedure swap (this, for_that : in out swap_type);
+end LA14021_0;
+
+---------------------------------------------------------
+
+package body LA14021_0 is
+ procedure swap (this, for_that : in out swap_type) is
+ temp : swap_type;
+ begin
+ for i in int_type'first..times loop
+ temp := this;
+ this := for_that;
+ for_that := temp;
+ end loop;
+ end swap;
+end LA14021_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140211.am b/gcc/testsuite/ada/acats/tests/l/la140211.am
new file mode 100644
index 000000000..f6b17576d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140211.am
@@ -0,0 +1,134 @@
+-- LA140211.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic package depends on another
+-- generic package that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package, a second generic
+-- package that withs the first and a main procedure that
+-- withs the second package. Then, a new version of the
+-- first package is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed function and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140210 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140211 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140212 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140210.A
+-- -> LA140211.AM
+-- LA140212.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14021_1 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008R baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Moved LA14021_0 to a separate file.
+--
+--!
+
+package LA14021_1 is
+ type data_record is tagged
+ record
+ info : character;
+ end record;
+ subtype loop_count is integer range 1..100;
+ type data_type is new data_record with
+ record
+ serial : integer := 0;
+ end record;
+end LA14021_1;
+
+---------------------------------------------------------
+
+with LA14021_1;
+with LA14021_0;
+generic
+ type data_rec is new LA14021_1.data_record with private;
+package LA14021_2 is
+ package util is new LA14021_0 (character, LA14021_1.loop_count);
+ procedure flip_flop (rec1, rec2 : in out data_rec);
+end LA14021_2;
+
+---------------------------------------------------------
+
+package body LA14021_2 is
+ procedure flip_flop (rec1, rec2 : in out data_rec) is
+ begin
+ util.swap (rec1.info, rec2.info);
+ end flip_flop;
+end LA14021_2;
+
+---------------------------------------------------------
+
+with Report; use Report;
+with LA14021_1;
+with LA14021_2;
+
+procedure LA140211 is
+ package util is new LA14021_2 (LA14021_1.data_type);
+ datum_1 : LA14021_1.data_type := LA14021_1.data_type'('a', 1);
+ datum_2 : LA14021_1.data_type := LA14021_1.data_type'('b', 2);
+begin
+ Test ("LA14021", "Check that a compilation unit may " &
+ "not depend semantically on two " &
+ "different versions of the same " &
+ "compilation unit. Check the case " &
+ "where a generic package depends on " &
+ "another generic package that is changed");
+
+ util.flip_flop (datum_1, datum_2);
+ if datum_1.info = 'b' then
+ Failed ("Revised unit not used");
+ elsif datum_1.info /= 'a' then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140211;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140212.a b/gcc/testsuite/ada/acats/tests/l/la140212.a
new file mode 100644
index 000000000..0c689b999
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140212.a
@@ -0,0 +1,74 @@
+-- LA140212.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140211.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140211.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140211.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140210.A
+-- LA140211.AM
+-- -> LA140212.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140211.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008R baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+generic
+ type swap_type is private;
+ type int_type is range <>;
+ times : int_type :=2; --this line contains the change
+package LA14021_0 is
+ procedure swap (this, for_that : in out swap_type);
+end LA14021_0;
+
+---------------------------------------------------------
+
+package body LA14021_0 is
+ procedure swap (this, for_that : in out swap_type) is
+ temp : swap_type;
+ begin
+ for i in int_type'first..times loop
+ temp := this;
+ this := for_that;
+ for_that := temp;
+ end loop;
+ end swap;
+end LA14021_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140220.a b/gcc/testsuite/ada/acats/tests/l/la140220.a
new file mode 100644
index 000000000..c5e4c6575
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140220.a
@@ -0,0 +1,64 @@
+-- LA140220.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140221.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140221.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140221.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140220.A
+-- LA140221.AM
+-- LA140222.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140221.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+generic
+ type stuff is private;
+ type ptr is access stuff;
+ type return_result is range <>;
+ delta_val : return_result := 1;
+procedure LA14022_0 (pointer : in out ptr;
+ result : in out return_result);
+
+-------------------------------------------------------
+
+procedure LA14022_0 (pointer : in out ptr;
+ result : in out return_result) is
+begin
+ pointer := new stuff;
+ result := result + delta_val;
+end LA14022_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140221.am b/gcc/testsuite/ada/acats/tests/l/la140221.am
new file mode 100644
index 000000000..84003a62f
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140221.am
@@ -0,0 +1,128 @@
+-- LA140221.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic instantiation depends on
+-- a generic procedure that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic procedure, a second generic
+-- procedure, a generic instantiation of the second procedure
+-- that depends on both the first and second generic
+-- procedures, and a main procedure that withs the instantiated
+-- procedure. Then, a new version of the first generic
+-- procedure is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed function and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140220 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140221 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140222 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140220.A
+-- -> LA140221.AM
+-- LA140222.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14022_2 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008S baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Moved LA14022_0 to a separate file. Added
+-- pragma Elaborate to context clause of
+-- LA14022_2.
+--
+--!
+
+package LA14022_1 is
+ type rec_ptr;
+ type rec is record
+ data : integer;
+ end record;
+ type rec_ptr is access rec;
+ subtype data_int is integer range 0..100;
+end LA14022_1;
+
+
+with LA14022_0;
+with LA14022_1;
+pragma Elaborate (LA14022_0);
+procedure LA14022_2 is new
+ LA14022_0 (stuff => LA14022_1.rec,
+ ptr => LA14022_1.rec_ptr,
+ return_result => LA14022_1.data_int,
+ delta_val => 50);
+
+with Report;
+use Report;
+with LA14022_2;
+with LA14022_1;
+use LA14022_1;
+procedure LA140221 is
+ TC_val : LA14022_1.data_int := 10;
+ P, Q : LA14022_1.rec_ptr;
+begin
+ Test ("LA14022", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a generic " &
+ "instantiation depends on a generic " &
+ "procedure that is changed");
+
+ Q := P;
+ LA14022_2 (Q, TC_val);
+
+ if Q /= P then
+ Failed ("Wrong procedure result");
+ end if;
+ if TC_val = 60 then
+ Failed ("Old instantiation used");
+ elsif TC_val /= 10 then
+ Failed ("Wrong result");
+ end if;
+
+ Result;
+end LA140221;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140222.a b/gcc/testsuite/ada/acats/tests/l/la140222.a
new file mode 100644
index 000000000..424236b3e
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140222.a
@@ -0,0 +1,69 @@
+-- LA140222.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140221.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140221.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140221.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140220.A
+-- LA140221.AM
+-- -> LA140222.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140221.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008S baseline version
+-- 23 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+generic
+ type stuff is private;
+ type ptr is access stuff;
+ type return_result is range <>;
+ delta_val : return_result := 1;
+procedure LA14022_0 (pointer : in out ptr;
+ result : in out return_result);
+
+-------------------------------------------------------
+
+procedure LA14022_0 (pointer : in out ptr;
+ result : in out return_result) is
+begin
+ pointer := null;
+ result := result + return_result'first;
+end LA14022_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140240.a b/gcc/testsuite/ada/acats/tests/l/la140240.a
new file mode 100644
index 000000000..e5541006e
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140240.a
@@ -0,0 +1,61 @@
+-- LA140240.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140242.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140242.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140242.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140240.A
+-- LA140241.A
+-- LA140242.AM
+-- LA140243.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140242.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008U baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+generic
+ Local_max : positive;
+ type Thing is private;
+package LA14024_0 is
+ type Goodies is tagged
+ record
+ X, Y : integer := 100;
+ end record;
+end LA14024_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140241.a b/gcc/testsuite/ada/acats/tests/l/la140241.a
new file mode 100644
index 000000000..dde3b3db5
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140241.a
@@ -0,0 +1,55 @@
+-- LA140241.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140242.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140242.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140242.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140240.A
+-- -> LA140241.A
+-- LA140242.AM
+-- LA140243.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140242.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008U baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+with LA14024_0;
+
+package LA14024_1 is new LA14024_0 (100, integer);
diff --git a/gcc/testsuite/ada/acats/tests/l/la140242.am b/gcc/testsuite/ada/acats/tests/l/la140242.am
new file mode 100644
index 000000000..a156465a9
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140242.am
@@ -0,0 +1,104 @@
+-- LA140242.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic instantiation depends on
+-- a generic package that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package, a generic
+-- instantiation of the generic package, and a main
+-- procedure that withs the instantiated generic
+-- package. Then, a new version of the first generic
+-- package is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed package and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140240 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140241 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140242 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140243 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140240.A
+-- LA140241.A
+-- -> LA140242.AM
+-- LA140243.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140242 is missing or obsolete, or that LA14024_1 is
+-- missing or obsolete (optional) and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008U baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14024_1;
+
+procedure LA140242 is
+ TC_val : integer := 0;
+ Local_goodies : LA14024_1.Goodies;
+begin
+ Test ("LA14024", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a generic " &
+ "instantiation depends on a generic " &
+ "package that is changed");
+
+ TC_val := Local_goodies.X;
+
+ if TC_val = 100 then
+ Failed ("Revised generic package not used");
+ elsif TC_val /= -10 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140242;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140243.a b/gcc/testsuite/ada/acats/tests/l/la140243.a
new file mode 100644
index 000000000..98b03438b
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140243.a
@@ -0,0 +1,61 @@
+-- LA140243.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140242.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140242.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140242.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140240.A
+-- LA140241.A
+-- LA140242.AM
+-- -> LA140243.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140242.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008U baseline version
+-- 29 JUN 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+generic
+ Local_max : positive;
+ type Thing is private;
+package LA14024_0 is
+ type Goodies is tagged
+ record
+ Y, X : integer := -10;
+ end record;
+end LA14024_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140250.a b/gcc/testsuite/ada/acats/tests/l/la140250.a
new file mode 100644
index 000000000..44477df4d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140250.a
@@ -0,0 +1,56 @@
+-- LA140250.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140251.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140251.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140251.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140050.A
+-- LA140051.AM
+-- LA140052.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140251.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA14025_0 is
+ subtype byte is integer range 0..511;
+ byte_val : constant byte := 128;
+ type Data_rec is tagged record
+ Id : integer := 1;
+ Val: byte := byte_val;
+ end record;
+end LA14025_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140251.am b/gcc/testsuite/ada/acats/tests/l/la140251.am
new file mode 100644
index 000000000..7f7a4791d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140251.am
@@ -0,0 +1,141 @@
+-- LA140251.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic instantiation depends on
+-- a non-generic package that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package, a generic package, a
+-- generic instantiation that withs both of the first two
+-- packages, and a main procedure that withs the instantiated
+-- generic package. Then, a new version of the first
+-- package is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the withed package and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140250 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140251 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140252 (and include the results in the
+-- program library).
+-- 4) Attempt to build an executable image.
+-- 5) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140250.A
+-- -> LA140251.AM
+-- LA140252.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14025 is missing or obsolete, or that LA14025_2 is
+-- missing or obsolete (optional) and no executable image
+-- results. The test passes if an executable image is produced
+-- and reports "PASSED" (in case the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008V baseline version
+-- 06 JUL 95 SAIC Initial version
+-- 08 NOV 96 SAIC Unit naming correction
+-- 07 DEC 96 SAIC Moved LA14025_0 to a separate file. Added
+-- pragma Elaborate to context clause of
+-- LA14025_2.
+--
+--!
+
+with LA14025_0;
+generic
+ type your_addition is (<>);
+package LA14025_1 is --extensions, utilities
+ type extended_record is new LA14025_0.data_rec with record
+ new_data : your_addition;
+ end record;
+ procedure stuff (param : your_addition);
+ function fetch (param : LA14025_0.byte) return LA14025_0.byte;
+private
+ obj : extended_record;
+end LA14025_1;
+
+---------------------------------------------
+
+package body LA14025_1 is
+ procedure stuff (param : your_addition) is
+ begin
+ obj.new_data := param;
+ end stuff;
+
+ function fetch (param : LA14025_0.byte) return LA14025_0.byte is
+ begin
+ return (param + obj.val);
+ end fetch;
+end LA14025_1;
+
+---------------------------------------------
+
+with LA14025_0;
+with LA14025_1;
+pragma Elaborate (LA14025_1);
+package LA14025_2 is new LA14025_1 (LA14025_0.byte);
+
+---------------------------------------------
+
+with Report; use Report;
+with LA14025_2;
+with LA14025_0;
+procedure LA140251 is
+ TC_val : LA14025_0.byte := 0;
+ Temp_var : LA14025_2.extended_record;
+begin
+ Test ("LA14025", "Check that a compilation unit may not " &
+ "depend semantically on two different " &
+ "versions of the same compilation unit. " &
+ "Check the case where a generic " &
+ "instantiation depends on a non-generic " &
+ "package that is changed");
+
+ LA14025_2.stuff(10);
+
+ TC_val := LA14025_2.fetch (Temp_var.val);
+
+ if TC_val = 256 then
+ Failed ("Old version of package used");
+ elsif TC_val /= 128 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140251;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140252.a b/gcc/testsuite/ada/acats/tests/l/la140252.a
new file mode 100644
index 000000000..2fce76cea
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140252.a
@@ -0,0 +1,59 @@
+-- LA140252.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140251.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140251.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140251.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140050.A
+-- LA140051.AM
+-- -> LA140052.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140251.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008V baseline version
+-- 06 JUL 95 SAIC Initial version
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+package LA14025_0 is
+ subtype byte is integer range 0..511;
+ byte_val : constant byte := 64;
+ type Data_rec is tagged record
+ Id : integer := 1;
+ Val: byte := byte_val;
+ end record;
+end LA14025_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140260.a b/gcc/testsuite/ada/acats/tests/l/la140260.a
new file mode 100644
index 000000000..fae173667
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140260.a
@@ -0,0 +1,98 @@
+-- LA140260.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140262.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140262.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140262.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140260.A
+-- LA140261.A
+-- LA140262.AM
+-- LA140263.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140262.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+package LA14026_0 is
+ type basic_rec is tagged
+ record
+ null;
+ end record;
+end LA14026_0;
+
+---------------------------------------------------------
+
+with LA14026_0;
+generic
+ type data_type is private;
+ type serial_type is range <>;
+ serial_init : serial_type;
+package LA14026_1 is
+
+ pragma Elaborate_Body;
+
+ function get_serial_num return serial_type;
+
+ type node_type is new LA14026_0.basic_rec with
+ record
+ data_field : data_type;
+ serial_no : serial_type := get_serial_num;
+ end record;
+end LA14026_1;
+
+---------------------------------------------------------
+
+package body LA14026_1 is
+ serial : serial_type := serial_init;
+ function get_serial_num return serial_type is
+ begin
+ serial := serial + 1;
+ return serial;
+ end;
+end LA14026_1;
+
+---------------------------------------------------------
+
+package LA14026_2 is
+ subtype serial_type is integer range 0..5;
+ subtype data_type is integer range 0..100;
+
+ type data_rec is record
+ F1 : data_type := data_type'first;
+ F2 : data_type := data_type'last;
+ end record;
+end LA14026_2;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140261.a b/gcc/testsuite/ada/acats/tests/l/la140261.a
new file mode 100644
index 000000000..73cd334ed
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140261.a
@@ -0,0 +1,52 @@
+-- LA140261.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140262.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140262.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140262.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140260.A
+-- -> LA140261.A
+-- LA140262.AM
+-- LA140263.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140262.AM.
+--
+-- CHANGE HISTORY:
+-- 07 DEC 96 SAIC ACVC 2.1: Initial version.
+--
+--!
+
+with LA14026_2, LA14026_1;
+package LA14026_3 is new LA14026_1 (LA14026_2.data_rec,
+ LA14026_2.serial_type, 0);
diff --git a/gcc/testsuite/ada/acats/tests/l/la140262.am b/gcc/testsuite/ada/acats/tests/l/la140262.am
new file mode 100644
index 000000000..115094717
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140262.am
@@ -0,0 +1,140 @@
+-- LA140262.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a generic instantiation depends on
+-- a generic package instantiation that is changed.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a generic package, a generic
+-- instantiation of the generic package, another generic
+-- package, a generic instantiation of the second generic
+-- package that withs the first generic instantiation
+-- packages, and a main procedure that withs the instantiated
+-- generic package. Then, a new version of the first generic
+-- package is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the instantiation and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140260 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140261 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140262 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140263 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140260.A
+-- LA140261.A
+-- -> LA140262.AM
+-- LA140263.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA140260 is missing or obsolete, or that LA14026_5 is
+-- missing or obsolete (optional) and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008W baseline version
+-- 06 JUL 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Moved LA14026_3 to a separate file. Added
+-- pragma Elaborate to context clause of LA14026_5.
+--
+--!
+
+with LA14026_0;
+generic
+ type rec is new LA14026_0.basic_rec with private;
+package LA14026_4 is
+ type extended_node;
+ type extended_node_ptr is access extended_node;
+ type extended_node is new rec with
+ record
+ next : extended_node_ptr := null;
+ end record;
+ procedure add_next (node : in out extended_node; ptr : extended_node_ptr);
+end LA14026_4;
+
+---------------------------------------------------------
+
+package body LA14026_4 is
+ procedure add_next (node : in out extended_node;
+ ptr : extended_node_ptr) is
+ begin
+ node.next := ptr;
+ end add_next;
+end LA14026_4;
+
+---------------------------------------------------------
+
+with LA14026_3, LA14026_4;
+pragma Elaborate (LA14026_4);
+package LA14026_5 is new LA14026_4 (LA14026_3.node_type);
+
+---------------------------------------------------------
+
+with Report;
+use Report;
+with LA14026_5;
+
+procedure LA140262 is
+ root : LA14026_5.extended_node_ptr := new LA14026_5.extended_node;
+ next : LA14026_5.extended_node_ptr := new LA14026_5.extended_node;
+begin
+ Test ("LA14026","Check that a compilation unit may not depend " &
+ "semantically on two different versions of " &
+ "the same compilation unit. Check the case " &
+ "where a generic instantiation depends on " &
+ "a generic package instantiation that is " &
+ "changed");
+
+
+ LA14026_5.add_next (root.all, next);
+
+ if root.all.next.serial_no = 2 then
+ Failed ("Old version of unit used");
+ elsif root.all.next.serial_no /= 5 then
+ Failed ("Wrong value returned");
+ end if;
+
+ Result;
+end LA140262;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140263.a b/gcc/testsuite/ada/acats/tests/l/la140263.a
new file mode 100644
index 000000000..c0224894d
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140263.a
@@ -0,0 +1,57 @@
+-- LA140263.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140262.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140262.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140262.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140260.A
+-- LA140261.A
+-- LA140262.AM
+-- -> LA140263.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140262.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5008W baseline version
+-- 06 JUL 95 SAIC Initial version
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+-- 07 DEC 96 SAIC Modified prologue to reflect new test
+-- file organization.
+--
+--!
+
+with LA14026_2, LA14026_1;
+package LA14026_3 is new LA14026_1 (LA14026_2.data_rec,
+ LA14026_2.serial_type, 3);
diff --git a/gcc/testsuite/ada/acats/tests/l/la140270.a b/gcc/testsuite/ada/acats/tests/l/la140270.a
new file mode 100644
index 000000000..dab574cd6
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140270.a
@@ -0,0 +1,56 @@
+-- LA140270.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140272.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140272.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140272.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- -> LA140270.A
+-- LA140271.A
+-- LA140272.AM
+-- LA140273.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140272.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007O baseline version
+-- 28 JUL 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14027_0 is
+ Sample_value : integer := 100;
+end LA14027_0;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140271.a b/gcc/testsuite/ada/acats/tests/l/la140271.a
new file mode 100644
index 000000000..703b1b8ae
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140271.a
@@ -0,0 +1,93 @@
+-- LA140271.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140272.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140272.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140272.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140270.A
+-- -> LA140271.A
+-- LA140272.AM
+-- LA140273.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140272.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007O baseline version
+-- 28 JUL 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions. Removed loop from
+-- task body to prevent hang.
+--
+--!
+
+package LA14027_1 is
+ procedure Random (Number : out integer);
+end LA14027_1;
+
+ --------------------------------------------
+
+package body LA14027_1 is
+ task LA14027_2 is
+ entry Get (Value : out integer);
+ end LA14027_2;
+
+ task body LA14027_2 is separate;
+
+ procedure Random (Number : out integer) is
+ begin
+ -- get a random number from sampling task
+ LA14027_2.Get (Number);
+ -- massage it
+ Number := Number + 10;
+ -- and return it
+ end;
+end LA14027_1;
+
+ --------------------------------------------
+
+with LA14027_0; -- must resolve this
+
+separate (LA14027_1)
+
+task body LA14027_2 is
+ begin
+ select
+ accept Get (Value : out integer) do
+ -- sample some random physical process
+ Value := LA14027_0.Sample_value;
+ -- and return it
+ end Get;
+ end select;
+end LA14027_2;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140272.am b/gcc/testsuite/ada/acats/tests/l/la140272.am
new file mode 100644
index 000000000..a8cd1c958
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140272.am
@@ -0,0 +1,102 @@
+-- LA140272.AM
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- Check that a compilation unit may not depend semantically
+-- on two different versions of the same compilation unit.
+-- Check the case where a task body depends on non-generic
+-- package specification.
+--
+-- TEST DESCRIPTION:
+-- This test compiles a package spec, another package
+-- with a body containing a task with a body that withs the
+-- first package spec, and a main procedure that withs the
+-- second package. Then, a new version of the first package
+-- spec is compiled (in a separate file, simulating
+-- editing and modification to the unit). Unless automatic
+-- recompilation is supported, this test should fail to link.
+-- Otherwise, the test should recompile and link the correct
+-- version of the package spec and report "PASSED" at
+-- execution time.
+--
+-- SPECIAL REQUIREMENTS:
+-- To build this test:
+-- 1) Compile the file LA140270 (and include the results in the
+-- program library).
+-- 2) Compile the file LA140271 (and include the results in the
+-- program library).
+-- 3) Compile the file LA140272 (and include the results in the
+-- program library).
+-- 4) Compile the file LA140273 (and include the results in the
+-- program library).
+-- 5) Attempt to build an executable image.
+-- 6) If an executable image results, run it.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140270.A
+-- LA140271.A
+-- -> LA140272.AM
+-- LA140273.A
+--
+-- PASS/FAIL CRITERIA:
+-- The test passes if a link time error message reports that
+-- LA14027_1.LA14027_2 is missing or obsolete and no executable image
+-- results. The test also passes if an executable image is produced
+-- and reports "PASSED" (in the case where the implementation supports
+-- automatic recompilation).
+--
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007O baseline version
+-- 28 JUL 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 18 NOV 96 SAIC Modified unit names and prologue to conform
+-- to coding conventions.
+--
+--!
+
+with Report; use Report;
+with LA14027_1;
+
+procedure LA140272 is
+ TC_val : integer := 0;
+begin
+ Test ("LA14027", "Check that a compilation unit may not depend " &
+ "semantically on two different versions of the " &
+ "same compilation unit. Check the case where " &
+ "a task body depends on non-generic package " &
+ "specification");
+
+ LA14027_1.Random (TC_val);
+
+ if TC_val = 110 then
+ Failed ("Old version used");
+ elsif TC_val /= 0 then
+ Failed ("Incorrect value returned");
+ end if;
+
+ Result;
+end LA140272;
diff --git a/gcc/testsuite/ada/acats/tests/l/la140273.a b/gcc/testsuite/ada/acats/tests/l/la140273.a
new file mode 100644
index 000000000..0e535f10c
--- /dev/null
+++ b/gcc/testsuite/ada/acats/tests/l/la140273.a
@@ -0,0 +1,58 @@
+-- LA140273.A
+--
+-- Grant of Unlimited Rights
+--
+-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
+-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
+-- unlimited rights in the software and documentation contained herein.
+-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
+-- this public release, the Government intends to confer upon all
+-- recipients unlimited rights equal to those held by the Government.
+-- These rights include rights to use, duplicate, release or disclose the
+-- released technical data and computer software in whole or in part, in
+-- any manner and for any purpose whatsoever, and to have or permit others
+-- to do so.
+--
+-- DISCLAIMER
+--
+-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
+-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
+-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
+-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
+-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
+-- PARTICULAR PURPOSE OF SAID MATERIAL.
+--*
+--
+-- OBJECTIVE:
+-- See LA140272.AM.
+--
+-- TEST DESCRIPTION:
+-- See LA140272.AM.
+--
+-- SPECIAL REQUIREMENTS:
+-- See LA140272.AM.
+--
+-- TEST FILES:
+-- This test consists of the following files:
+-- LA140270.A
+-- LA140271.A
+-- LA140272.AM
+-- -> LA140273.A
+--
+-- PASS/FAIL CRITERIA:
+-- See LA140272.AM.
+--
+-- CHANGE HISTORY:
+-- 01 MAY 95 ACVC 1.12 LA5007O baseline version
+-- 28 JUL 95 SAIC Initial version
+-- 29 JAN 96 SAIC First revision after review
+-- 18 NOV 96 SAIC Modified prologue to conform
+-- to coding conventions.
+--
+--!
+
+package LA14027_0 is
+ New_var : integer := 100;
+ Local_array : array (1..51) of integer;
+ Sample_value : constant integer := -10;
+end LA14027_0;