diff options
| author | Tristan Gingold <tgingold@free.fr> | 2022-07-02 07:39:22 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2022-07-02 07:39:22 +0200 | 
| commit | 4dcb08358badd48db46887f5267adf5bcf0d64d2 (patch) | |
| tree | 12fca7d4730e4f1458d509dcac20080001360c4e /src | |
| parent | 48105de5752700a8625a89027d3617907bb503a8 (diff) | |
| download | ghdl-4dcb08358badd48db46887f5267adf5bcf0d64d2.tar.gz ghdl-4dcb08358badd48db46887f5267adf5bcf0d64d2.tar.bz2 ghdl-4dcb08358badd48db46887f5267adf5bcf0d64d2.zip  | |
vhdl-sem_names: avoid crash on incorrect selected name.
For #2116
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 043ca36e8..bf195d91e 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -2588,7 +2588,9 @@ package body Vhdl.Sem_Names is             | Iir_Kind_Attribute_Declaration             | Iir_Kind_Type_Conversion             | Iir_Kind_Element_Attribute -           | Iir_Kind_Enumeration_Literal => +           | Iir_Kind_Enumeration_Literal +           | Iir_Kind_Unit_Declaration +           | Iir_Kind_Variable_Assignment_Statement =>              if not Soft then                 Error_Msg_Sem                   (+Prefix_Loc, "%n cannot be selected by name", +Prefix); @@ -3375,13 +3377,11 @@ package body Vhdl.Sem_Names is              Error_Msg_Sem (+Attr, "prefix of user defined attribute cannot be "                               & "an anonymous object");              return Error_Mark; -         when Iir_Kind_Attribute_Declaration => -            Error_Msg_Sem (+Attr, "prefix of user defined attribute cannot be " -                             & "an attribute"); -            return Error_Mark;           when Iir_Kind_Function_Call             | Iir_Kind_Type_Conversion -           | Iir_Kinds_Attribute => +           | Iir_Kinds_Attribute +           | Iir_Kind_Attribute_Declaration +           | Iir_Kind_Library_Declaration =>              Error_Msg_Sem (+Attr, "invalid prefix for user defined attribute");              return Error_Mark;           when Iir_Kinds_Object_Declaration  | 
