aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-17 17:35:09 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-17 17:35:09 +0200
commit7a78fa979e331eb8d04b3b62563c0b8e75706858 (patch)
treec78041626c1087112e467642413d00cfeb0fe710
parent305379908d3e3d0e17703c8fbce977c92fbc390d (diff)
downloadgcc-7a78fa979e331eb8d04b3b62563c0b8e75706858.zip
gcc-7a78fa979e331eb8d04b3b62563c0b8e75706858.tar.gz
gcc-7a78fa979e331eb8d04b3b62563c0b8e75706858.tar.bz2
[multiple changes]
2010-06-17 Robert Dewar <dewar@adacore.com> * sem_util.adb: Minor reformatting 2010-06-17 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Withed_Unit): if the unit in the with_clause is a generic instance, the clause now denotes the instance body. Traverse the corresponding spec because there may be no other dependence that will force the traversal of its own context. From-SVN: r160925
-rw-r--r--gcc/ada/ChangeLog11
-rw-r--r--gcc/ada/sem.adb12
-rw-r--r--gcc/ada/sem_util.adb4
3 files changed, 25 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 278b183..1054620 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@
+2010-06-17 Robert Dewar <dewar@adacore.com>
+
+ * sem_util.adb: Minor reformatting
+
+2010-06-17 Ed Schonberg <schonberg@adacore.com>
+
+ * sem.adb (Do_Withed_Unit): if the unit in the with_clause is a generic
+ instance, the clause now denotes the instance body. Traverse the
+ corresponding spec because there may be no other dependence that will
+ force the traversal of its own context.
+
2010-06-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Is_Ancestor_Unit): Subsidiary to
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 8d3ca2a..1eeffcc 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -1701,6 +1701,18 @@ package body Sem is
procedure Do_Withed_Unit (Withed_Unit : Node_Id) is
begin
Do_Unit_And_Dependents (Withed_Unit, Unit (Withed_Unit));
+
+ -- If the unit in the with_clause is a generic instance, the clause
+ -- now denotes the instance body. Traverse the corresponding spec
+ -- because there may be no other dependence that will force the
+ -- traversal of its own context.
+
+ if Nkind (Unit (Withed_Unit)) = N_Package_Body
+ and then Is_Generic_Instance
+ (Defining_Entity (Unit (Library_Unit (Withed_Unit))))
+ then
+ Do_Withed_Unit (Library_Unit (Withed_Unit));
+ end if;
end Do_Withed_Unit;
----------------------------
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 06676ea..29ddee9 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -1699,8 +1699,8 @@ package body Sem_Util is
Next_Entity (Id);
- -- For a type declared in System, some of its operations
- -- may appear in the target-specific extension to System.
+ -- For a type declared in System, some of its operations may
+ -- appear in the target-specific extension to System.
if No (Id)
and then Chars (B_Scope) = Name_System