diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 01:07:23 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-26 01:07:23 +0000 |
commit | 6c17421b9705e186d187368247e3aea7175fe52c (patch) | |
tree | 81712cb07187dee5148b969898b86b60b254986a /gcc | |
parent | ffc3183df7846687c5713e09bc25917f5adfb5d2 (diff) | |
download | gcc-6c17421b9705e186d187368247e3aea7175fe52c.tar.gz |
* sem_elab.adb (Check_A_Call): check for renaming before finding the
enclosing unit, which may already be different from the calling unit.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46512 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/sem_elab.adb | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e9fe3dda8fc..a3bdfef7997 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 Ed Schonberg <schonber@gnat.com> + + * sem_elab.adb (Check_A_Call): check for renaming before finding the + enclosing unit, which may already be different from the calling unit. + 2001-10-25 Geert Bosch <bosch@gnat.com> * 4gintnam.ads: fix header format. diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 555abb8ca88..943161addac 100644 --- a/gcc/ada/sem_elab.adb +++ b/gcc/ada/sem_elab.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.84 $ +-- $Revision$ -- -- -- Copyright (C) 1997-2001 Free Software Foundation, Inc. -- -- -- @@ -549,18 +549,26 @@ package body Sem_Elab is -- Loop to carefully follow renamings and derivations -- one step outside the current unit, but not further. - loop + if not Inst_Case + and then Present (Alias (Ent)) + then + E_Scope := Alias (Ent); + else E_Scope := Ent; + end if; + + loop while not Is_Compilation_Unit (E_Scope) loop E_Scope := Scope (E_Scope); end loop; -- If E_Scope is the same as C_Scope, it means that there - -- definitely was a renaming or derivation, and we are - -- not yet out of the current unit. + -- definitely was a local renaming or derivation, and we + -- are not yet out of the current unit. exit when E_Scope /= C_Scope; Ent := Alias (Ent); + E_Scope := Ent; end loop; end if; |