From 5f41fdc72fccd7169dc812c8690e82222ae1aca1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 31 Dec 2013 19:01:48 +0100 Subject: Fix bug21274. WIP for VHDL08. --- sem_scopes.adb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sem_scopes.adb') 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) -- cgit v1.2.3