diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-06-21 02:57:50 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-06-21 02:57:50 +0200 |
commit | dc45124d37fb77f49d35e2500694725787877157 (patch) | |
tree | f816cec934fda5b338e28a4bfaa8fd5a68c060ac /sem_assocs.adb | |
parent | 76f5de492f91bf751b386072a67f78db83bd53b8 (diff) | |
download | ghdl-dc45124d37fb77f49d35e2500694725787877157.tar.gz ghdl-dc45124d37fb77f49d35e2500694725787877157.tar.bz2 ghdl-dc45124d37fb77f49d35e2500694725787877157.zip |
improve error message for error in default binding.
Diffstat (limited to 'sem_assocs.adb')
-rw-r--r-- | sem_assocs.adb | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/sem_assocs.adb b/sem_assocs.adb index d752c7949..ff7c5ebfa 100644 --- a/sem_assocs.adb +++ b/sem_assocs.adb @@ -65,24 +65,6 @@ package body Sem_Assocs is return Ok; end Sem_Actual_Of_Association_Chain; - function Get_Mode_Name (Mode : Iir_Mode) return String is - begin - case Mode is - when Iir_Unknown_Mode => - raise Internal_Error; - when Iir_Linkage_Mode => - return "linkage"; - when Iir_Buffer_Mode => - return "buffer"; - when Iir_Out_Mode => - return "out"; - when Iir_Inout_Mode => - return "inout"; - when Iir_In_Mode => - return "in"; - end case; - end Get_Mode_Name; - procedure Check_Parameter_Association_Restriction (Inter : Iir; Base_Actual : Iir; Loc : Iir) is @@ -344,10 +326,12 @@ package body Sem_Assocs is end if; end if; - Error_Msg_Sem - ("cannot associate " & Get_Mode_Name (Fmode) & " " - & Disp_Node (Formal) & " with actual port of mode " - & Get_Mode_Name (Amode), Assoc); + if Assoc /= Null_Iir then + Error_Msg_Sem + ("cannot associate " & Get_Mode_Name (Fmode) & " " + & Disp_Node (Formal) & " with actual port of mode " + & Get_Mode_Name (Amode), Assoc); + end if; return False; end Check_Port_Association_Restriction; |