summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-load.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-09 14:10:15 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-09 14:10:15 +0200
commit1c383b4cd4cdf0183b9f9004a987b614cc169892 (patch)
treeba168198e1d71f02176ffd34efa5fad62bb6db42 /gcc/ada/lib-load.adb
parent4a77c72b6b82fe31fa897ef5ced8579b706c9dfc (diff)
downloadgcc-1c383b4cd4cdf0183b9f9004a987b614cc169892.tar.gz
[multiple changes]
2009-04-09 Robert Dewar <dewar@adacore.com> * g-comver.adb: Minor reformatting. 2009-04-09 Thomas Quinot <quinot@adacore.com> * lib-load.ads (Load_Unit): Update documentation. 2009-04-09 Ed Schonberg <schonberg@adacore.com> * lib-load.adb (Load_Unit): When loading the parent of a child unit named in a with_clause, retain the with_clause to preserve a limited_with indication. From-SVN: r145829
Diffstat (limited to 'gcc/ada/lib-load.adb')
-rw-r--r--gcc/ada/lib-load.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/lib-load.adb b/gcc/ada/lib-load.adb
index 29a9090f90e..1ceb389d553 100644
--- a/gcc/ada/lib-load.adb
+++ b/gcc/ada/lib-load.adb
@@ -358,6 +358,8 @@ package body Lib.Load is
begin
-- If renamings are allowed and we have a child unit name, then we
-- must first load the parent to deal with finding the real name.
+ -- Retain the with_clause that names the child, so that if it is
+ -- limited, the parent is loaded under the same condition.
if Renamings and then Is_Child_Name (Load_Name) then
Unump :=
@@ -366,7 +368,8 @@ package body Lib.Load is
Required => Required,
Subunit => False,
Renamings => True,
- Error_Node => Error_Node);
+ Error_Node => Error_Node,
+ With_Node => With_Node);
if Unump = No_Unit then
return No_Unit;