aboutsummaryrefslogtreecommitdiffstats
path: root/sem_scopes.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2013-12-31 19:01:48 +0100
committerTristan Gingold <tgingold@free.fr>2013-12-31 19:01:48 +0100
commit5f41fdc72fccd7169dc812c8690e82222ae1aca1 (patch)
tree2e2cddb257b071ec30b79c0672e2320f5421468d /sem_scopes.adb
parent2fe0a5359e1bdf6dfdab20bea121db8f4e54ffe9 (diff)
downloadghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.gz
ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.tar.bz2
ghdl-5f41fdc72fccd7169dc812c8690e82222ae1aca1.zip
Fix bug21274.
WIP for VHDL08.
Diffstat (limited to 'sem_scopes.adb')
-rw-r--r--sem_scopes.adb12
1 files changed, 8 insertions, 4 deletions
diff --git a/sem_scopes.adb b/sem_scopes.adb
index 7737ed881..3acb6b141 100644
--- a/sem_scopes.adb
+++ b/sem_scopes.adb
@@ -832,13 +832,17 @@ package body Sem_Scopes is
Inter : Name_Interpretation_Type;
begin
Inter := Get_Interpretation (Id);
- if Get_Declaration (Inter) /= Old then
- raise Internal_Error;
- end if;
+ loop
+ exit when Get_Declaration (Inter) = Old;
+ Inter := Get_Next_Interpretation (Inter);
+ if not Valid_Interpretation (Inter) then
+ raise Internal_Error;
+ end if;
+ end loop;
+ Interpretations.Table (Inter).Decl := Decl;
if Get_Next_Interpretation (Inter) /= No_Name_Interpretation then
raise Internal_Error;
end if;
- Interpretations.Table (Inter).Decl := Decl;
end Replace_Name;
procedure Name_Visible (Ident : Name_Id; Decl : Iir)