diff --git a/tgt-vhdl/display.cc b/tgt-vhdl/display.cc index c599aabc3..e70f1bce5 100644 --- a/tgt-vhdl/display.cc +++ b/tgt-vhdl/display.cc @@ -162,7 +162,7 @@ int draw_stask_display(vhdl_procedural *proc, stmt_container *container, } else { vhdl_expr *base = translate_expr(net); - if (NULL == base) + if (NULL == base) return 1; display_write(container, base); diff --git a/tgt-vhdl/expr.cc b/tgt-vhdl/expr.cc index f0aec0019..007abb203 100644 --- a/tgt-vhdl/expr.cc +++ b/tgt-vhdl/expr.cc @@ -355,8 +355,10 @@ static vhdl_expr *translate_select(ivl_expr_t e) { vhdl_var_ref *from = dynamic_cast(translate_expr(ivl_expr_oper1(e))); - if (NULL == from) + if (NULL == from) { + error("Can only select from variable reference"); return NULL; + } ivl_expr_t o2 = ivl_expr_oper2(e); if (o2) { @@ -454,7 +456,7 @@ vhdl_expr *translate_expr(ivl_expr_t e) { assert(e); ivl_expr_type_t type = ivl_expr_type(e); - + switch (type) { case IVL_EX_STRING: return translate_string(e);