aboutsummaryrefslogtreecommitdiffstats
path: root/sem.adb
diff options
context:
space:
mode:
Diffstat (limited to 'sem.adb')
-rw-r--r--sem.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/sem.adb b/sem.adb
index bec0d617a..f34ccc8cb 100644
--- a/sem.adb
+++ b/sem.adb
@@ -1445,11 +1445,12 @@ package body Sem is
procedure Set_Subprogram_Overload_Number (Decl : Iir)
is
+ Id : constant Name_Id := Get_Identifier (Decl);
Inter : Name_Interpretation_Type;
Prev : Iir;
Num : Iir_Int32;
begin
- Inter := Get_Interpretation (Get_Identifier (Decl));
+ Inter := Get_Interpretation (Id);
while Valid_Interpretation (Inter)
and then Is_In_Current_Declarative_Region (Inter)
loop
@@ -1479,8 +1480,11 @@ package body Sem is
-- Implicit declarations aren't taken into account (as they
-- are mangled differently).
Inter := Get_Next_Interpretation (Inter);
+ when Iir_Kind_Enumeration_Literal =>
+ -- Enumeration literal are ignored for overload number.
+ Inter := Get_Next_Interpretation (Inter);
when others =>
- -- Can be an enumeration literal or an error.
+ -- An error ?
Set_Overload_Number (Decl, 0);
return;
end case;