diff options
author | Ed Schonberg <schonber@gnat.com> | 2001-10-26 01:07:23 +0000 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-10-26 03:07:23 +0200 |
commit | 0597ce0bbff39bfcd0e00f02c3da423f3afa21d9 (patch) | |
tree | 81712cb07187dee5148b969898b86b60b254986a /gcc/ada/sem_elab.adb | |
parent | 3de6e6da5d17b613d682a2014645f4e04d582e35 (diff) | |
download | gcc-0597ce0bbff39bfcd0e00f02c3da423f3afa21d9.zip gcc-0597ce0bbff39bfcd0e00f02c3da423f3afa21d9.tar.gz gcc-0597ce0bbff39bfcd0e00f02c3da423f3afa21d9.tar.bz2 |
sem_elab.adb (Check_A_Call): check for renaming before finding the enclosing unit...
* sem_elab.adb (Check_A_Call): check for renaming before finding the
enclosing unit, which may already be different from the calling unit.
From-SVN: r46512
Diffstat (limited to 'gcc/ada/sem_elab.adb')
-rw-r--r-- | gcc/ada/sem_elab.adb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb index 555abb8..943161a 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; |