aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-07-22 21:06:01 +0200
committerTristan Gingold <tgingold@free.fr>2017-07-22 21:06:01 +0200
commit142b11b75fd1de271094caaf3b65967415aae81c (patch)
treed32597811c2849dd4ccf870e4b10c6f5ae903ecf /src
parent6fe0f5056de4e1287841a6f58dddc220829e8263 (diff)
downloadghdl-142b11b75fd1de271094caaf3b65967415aae81c.tar.gz
ghdl-142b11b75fd1de271094caaf3b65967415aae81c.tar.bz2
ghdl-142b11b75fd1de271094caaf3b65967415aae81c.zip
Avoid crash on indexed enumeration literal.
Fix #389
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_names.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index a7f3c9690..07262a64f 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -2668,7 +2668,8 @@ package body Sem_Names is
when Iir_Kinds_Process_Statement
| Iir_Kind_Component_Declaration
| Iir_Kind_Type_Conversion
- | Iir_Kind_Unit_Declaration =>
+ | Iir_Kind_Unit_Declaration
+ | Iir_Kind_Enumeration_Literal =>
Error_Msg_Sem (+Name, "%n cannot be indexed or sliced", +Prefix);
Res := Null_Iir;