diff options
author | Gary Dismukes <dismukes@adacore.com> | 2007-08-31 12:22:39 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-31 12:22:39 +0200 |
commit | 25859971802e6c24a568b4370221e2112ea25953 (patch) | |
tree | cdb270644b5755e0724d7f331087a6d8533ee6d2 /gcc/ada/exp_dbug.adb | |
parent | 55d4e6c0909277e0cd19e05de382ac87895b0db8 (diff) | |
download | gcc-25859971802e6c24a568b4370221e2112ea25953.zip gcc-25859971802e6c24a568b4370221e2112ea25953.tar.gz gcc-25859971802e6c24a568b4370221e2112ea25953.tar.bz2 |
exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a library-level package renaming...
2007-08-31 Gary Dismukes <dismukes@adacore.com>
* exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
library-level package renaming, pass the declaration associated with
the renaming's special debug variable to Qualify_Entity_Names to ensure
that its encoded name is properly qualified.
* exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
occurring in the list of entities to qualify, and do not attempt to
traverse an entity list in that case. Variables associated with
` library-level package renamings can now occur in the table.
* exp_dbug.ads: Revise documentation of the encoding for renaming
declarations.
From-SVN: r127973
Diffstat (limited to 'gcc/ada/exp_dbug.adb')
-rw-r--r-- | gcc/ada/exp_dbug.adb | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb index 76ae0ca..ac86891 100644 --- a/gcc/ada/exp_dbug.adb +++ b/gcc/ada/exp_dbug.adb @@ -1011,17 +1011,25 @@ package body Exp_Dbug is E := Defining_Entity (Name_Qualify_Units.Table (J)); Qualify_Entity_Name (E); - Ent := First_Entity (E); - while Present (Ent) loop - Qualify_Entity_Name (Ent); - Next_Entity (Ent); - - -- There are odd cases where Last_Entity (E) = E. This happens - -- in the case of renaming of packages. This test avoids getting - -- stuck in such cases. - - exit when Ent = E; - end loop; + -- Normally entities in the qualification list are scopes, but in the + -- case of a library-level package renaming there is an associated + -- variable that encodes the debugger name and that variable is + -- entered in the list since it occurs in the Aux_Decls list of the + -- compilation and doesn't have a normal scope. + + if Ekind (E) /= E_Variable then + Ent := First_Entity (E); + while Present (Ent) loop + Qualify_Entity_Name (Ent); + Next_Entity (Ent); + + -- There are odd cases where Last_Entity (E) = E. This happens + -- in the case of renaming of packages. This test avoids + -- getting stuck in such cases. + + exit when Ent = E; + end loop; + end if; end loop; end Qualify_All_Entity_Names; |