aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-06-06 08:49:07 +0200
committerTristan Gingold <tgingold@free.fr>2022-06-06 08:49:07 +0200
commit534c1ab53c5361d0c3668a62f3e4ce2799d0e8f2 (patch)
tree3330695b5bfa91eb9199a39eaaaeb440f0cdd57c /src/vhdl
parent245ceac7e29b0fa47316dc894db42d11fd9a535b (diff)
downloadghdl-534c1ab53c5361d0c3668a62f3e4ce2799d0e8f2.tar.gz
ghdl-534c1ab53c5361d0c3668a62f3e4ce2799d0e8f2.tar.bz2
ghdl-534c1ab53c5361d0c3668a62f3e4ce2799d0e8f2.zip
vhdl-sem_names: avoid a crash on incorrect selected name. For #2076
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-sem_names.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb
index 4ce05632f..6586389cb 100644
--- a/src/vhdl/vhdl-sem_names.adb
+++ b/src/vhdl/vhdl-sem_names.adb
@@ -2587,7 +2587,8 @@ package body Vhdl.Sem_Names is
| Iir_Kind_Procedure_Call_Statement
| Iir_Kind_Attribute_Declaration
| Iir_Kind_Type_Conversion
- | Iir_Kind_Element_Attribute =>
+ | Iir_Kind_Element_Attribute
+ | Iir_Kind_Enumeration_Literal =>
if not Soft then
Error_Msg_Sem
(+Prefix_Loc, "%n cannot be selected by name", +Prefix);