diff options
Diffstat (limited to 'src/vhdl/vhdl-sem.adb')
-rw-r--r-- | src/vhdl/vhdl-sem.adb | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb index 53a61ca3b..503d43293 100644 --- a/src/vhdl/vhdl-sem.adb +++ b/src/vhdl/vhdl-sem.adb @@ -545,16 +545,21 @@ package body Vhdl.Sem is Check_Port_Association_Bounds_Restrictions (Formal, Actual, Assoc); Prefix := Get_Object_Prefix (Object); - if Get_Kind (Prefix) = Iir_Kind_Interface_Signal_Declaration - then - declare - P : Boolean; - pragma Unreferenced (P); - begin - P := Check_Port_Association_Mode_Restrictions - (Formal_Base, Prefix, Assoc); - end; - end if; + case Get_Kind (Prefix) is + when Iir_Kind_Interface_Signal_Declaration => + declare + P : Boolean; + pragma Unreferenced (P); + begin + P := Check_Port_Association_Mode_Restrictions + (Formal_Base, Prefix, Assoc); + end; + when Iir_Kind_Signal_Declaration => + Set_Use_Flag (Prefix, True); + when others => + -- FIXME: attributes ? + null; + end case; else -- Expression. Set_Collapse_Signal_Flag (Assoc, False); @@ -580,6 +585,10 @@ package body Vhdl.Sem is (+Actual, "actual expression must be globally static"); end if; + + -- Is it possible to have a globally static name that is + -- not readable ? + Check_Read (Actual); else Error_Msg_Sem (+Assoc, |