From 6868127ba3689cef5b7614b4f63d7824d4714f63 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Thu, 3 Jul 2008 16:14:17 +0100 Subject: [PATCH] Make sure case expression has the correct type --- tgt-vhdl/stmt.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgt-vhdl/stmt.cc b/tgt-vhdl/stmt.cc index d01f4ec75..c03f0a11d 100644 --- a/tgt-vhdl/stmt.cc +++ b/tgt-vhdl/stmt.cc @@ -459,7 +459,7 @@ static int draw_case(vhdl_procedural *proc, stmt_container *container, vhdl_expr *when; ivl_expr_t net = ivl_stmt_case_expr(stmt, i); if (net) { - when = translate_expr(net); + when = translate_expr(net)->cast(test->get_type()); if (NULL == when) return 1; }