diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-09-18 07:09:26 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-09-18 07:09:26 +0200 |
commit | 5caf2d3a874957a07e48791ba3102e25394936b7 (patch) | |
tree | d3f633f85b6fe411ead9fd7b5d5dd981b1049f6d /src/vhdl | |
parent | 8e2c01b7ffc9738b40b08ab79d7408e225d204ec (diff) | |
download | ghdl-5caf2d3a874957a07e48791ba3102e25394936b7.tar.gz ghdl-5caf2d3a874957a07e48791ba3102e25394936b7.tar.bz2 ghdl-5caf2d3a874957a07e48791ba3102e25394936b7.zip |
vhdl-sem_names(sem_parenthesis_name): handle indexing of delayed attribute.
Fix #1515
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index 1ed7c7b64..cabef121b 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -3092,14 +3092,18 @@ package body Vhdl.Sem_Names is when Iir_Kind_Stable_Attribute | Iir_Kind_Quiet_Attribute | Iir_Kind_Delayed_Attribute => - if Actual /= Null_Iir then + if Get_Parameter (Prefix) /= Null_Iir then + -- Attribute is complete, so it is now index or slice. + Add_Result (Res, Sem_As_Indexed_Or_Slice_Name (Prefix, True)); + elsif Actual /= Null_Iir then Finish_Sem_Signal_Attribute_Signal (Prefix, Actual); Set_Named_Entity (Name, Prefix); + return; else Error_Msg_Sem (+Name, "bad attribute parameter"); Set_Named_Entity (Name, Error_Mark); + return; end if; - return; when Iir_Kind_Ramp_Attribute | Iir_Kind_Quantity_Slew_Attribute |