From b04a52567c5bb706afd2197898dc9cbf56fc99a4 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 23 Apr 2020 18:21:30 +0200 Subject: vhdl: avoid crash on indexed library declaration. --- src/vhdl/vhdl-sem_names.adb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 56aab131b..8f7cce4a5 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -3075,7 +3075,9 @@ package body Vhdl.Sem_Names is | Iir_Kind_Type_Conversion | Iir_Kind_Unit_Declaration | Iir_Kind_Enumeration_Literal - | Iir_Kind_Attribute_Declaration => + | Iir_Kind_Attribute_Declaration + | Iir_Kinds_Library_Unit + | Iir_Kind_Library_Declaration => Error_Msg_Sem (+Name, "%n cannot be indexed or sliced", +Prefix); Res := Null_Iir; @@ -3083,9 +3085,6 @@ package body Vhdl.Sem_Names is | Iir_Kind_Psl_Endpoint_Declaration => Res := Sem_Psl.Sem_Psl_Name (Name); - when Iir_Kinds_Library_Unit => - Error_Msg_Sem (+Name, "function name is a design unit"); - when Iir_Kind_Error => -- Continue with the error. Res := Prefix; -- cgit v1.2.3