aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_names.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-23 18:21:30 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-23 18:21:30 +0200
commitb04a52567c5bb706afd2197898dc9cbf56fc99a4 (patch)
treec892476fe29d678ea49330961f069cdd21c40145 /src/vhdl/vhdl-sem_names.adb
parent9e4aca9a9df5d2831a1981abf6a46182bcef33d1 (diff)
downloadghdl-b04a52567c5bb706afd2197898dc9cbf56fc99a4.tar.gz
ghdl-b04a52567c5bb706afd2197898dc9cbf56fc99a4.tar.bz2
ghdl-b04a52567c5bb706afd2197898dc9cbf56fc99a4.zip
vhdl: avoid crash on indexed library declaration.
Diffstat (limited to 'src/vhdl/vhdl-sem_names.adb')
-rw-r--r--src/vhdl/vhdl-sem_names.adb7
1 files changed, 3 insertions, 4 deletions
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;