From 5caf2d3a874957a07e48791ba3102e25394936b7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 18 Sep 2021 07:09:26 +0200 Subject: vhdl-sem_names(sem_parenthesis_name): handle indexing of delayed attribute. Fix #1515 --- src/vhdl/vhdl-sem_names.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/vhdl/vhdl-sem_names.adb') 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 -- cgit v1.2.3