aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-07-07 21:37:19 +0200
committerTristan Gingold <tgingold@free.fr>2018-07-08 13:40:09 +0200
commit714dd8242d80bfdc2decada72aef1b10827d9876 (patch)
treefd5a792e408929908baa03b1d4cdcfd3f0f7e52e /src/vhdl
parentecd48092b465229ef36c4a00ac0df3f2ae6672e0 (diff)
downloadghdl-714dd8242d80bfdc2decada72aef1b10827d9876.tar.gz
ghdl-714dd8242d80bfdc2decada72aef1b10827d9876.tar.bz2
ghdl-714dd8242d80bfdc2decada72aef1b10827d9876.zip
sem_names: indexed attribute declaration is an error.
Fix #621
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/sem_names.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index 141563292..a466bfc53 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -2244,7 +2244,8 @@ package body Sem_Names is
| Iir_Kind_Concurrent_Procedure_Call_Statement
| Iir_Kind_Component_Instantiation_Statement
| Iir_Kind_Slice_Name
- | Iir_Kind_Procedure_Call_Statement =>
+ | Iir_Kind_Procedure_Call_Statement
+ | Iir_Kind_Attribute_Declaration =>
if not Soft then
Error_Msg_Sem
(+Prefix_Loc, "%n cannot be selected by name", +Prefix);
@@ -2751,7 +2752,8 @@ package body Sem_Names is
| Iir_Kind_Component_Declaration
| Iir_Kind_Type_Conversion
| Iir_Kind_Unit_Declaration
- | Iir_Kind_Enumeration_Literal =>
+ | Iir_Kind_Enumeration_Literal
+ | Iir_Kind_Attribute_Declaration =>
Error_Msg_Sem (+Name, "%n cannot be indexed or sliced", +Prefix);
Res := Null_Iir;