diff options
-rw-r--r-- | src/synth/synth-vhdl_eval.adb | 16 | ||||
-rw-r--r-- | src/synth/synth-vhdl_expr.adb | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/synth/synth-vhdl_eval.adb b/src/synth/synth-vhdl_eval.adb index 23bb3dac8..2cc70bd52 100644 --- a/src/synth/synth-vhdl_eval.adb +++ b/src/synth/synth-vhdl_eval.adb @@ -2872,13 +2872,29 @@ package body Synth.Vhdl_Eval is when Iir_Predefined_Ieee_1164_To_Hstring | Iir_Predefined_Ieee_Numeric_Std_To_Hstring_Uns => + if Param1.Typ.Abound.Len = 0 then + Error_Msg_Synth + (Inst, Expr, "to_hstring fails with a null-vector"); + end if; return Eval_Logic_Vector_To_String (Param1, Res_Typ, False, 4); when Iir_Predefined_Ieee_Numeric_Std_To_Hstring_Sgn => + if Param1.Typ.Abound.Len = 0 then + Error_Msg_Synth + (Inst, Expr, "to_hstring fails with a null-vector"); + end if; return Eval_Logic_Vector_To_String (Param1, Res_Typ, True, 4); when Iir_Predefined_Ieee_1164_To_Ostring | Iir_Predefined_Ieee_Numeric_Std_To_Ostring_Uns => + if Param1.Typ.Abound.Len = 0 then + Error_Msg_Synth + (Inst, Expr, "to_ostring fails with a null-vector"); + end if; return Eval_Logic_Vector_To_String (Param1, Res_Typ, False, 3); when Iir_Predefined_Ieee_Numeric_Std_To_Ostring_Sgn => + if Param1.Typ.Abound.Len = 0 then + Error_Msg_Synth + (Inst, Expr, "to_ostring fails with a null-vector"); + end if; return Eval_Logic_Vector_To_String (Param1, Res_Typ, True, 3); when Iir_Predefined_Ieee_Numeric_Std_Max_Uns_Uns => diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index 6433fa616..1531c3b7a 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -2309,7 +2309,8 @@ package body Synth.Vhdl_Expr is -- Propagate error. return No_Valtyp; end if; - if Base.Val.Kind = Value_Signal + if (Base.Val.Kind = Value_Signal + or else Base.Val.Kind = Value_Sig_Val) and then Hook_Signal_Expr /= null then Base := Hook_Signal_Expr (Base); |