summaryrefslogtreecommitdiffstats
path: root/gcc/ada/lib-load.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-09 12:10:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-09 12:10:15 +0000
commitb56de1bc469bf0871d2801ab4536da086cf5e7a6 (patch)
treeba168198e1d71f02176ffd34efa5fad62bb6db42 /gcc/ada/lib-load.adb
parent8e58adedb84424f61133e374c843541d797b13d0 (diff)
downloadppe42-gcc-b56de1bc469bf0871d2801ab4536da086cf5e7a6.tar.gz
ppe42-gcc-b56de1bc469bf0871d2801ab4536da086cf5e7a6.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145829 138bc75d-0d04-0410-961f-82ee72b054a4
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;
OpenPOWER on IntegriCloud