From f261bf7e973f863e080b82010b529115aa1b8c9e Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Mon, 23 Jun 2008 15:13:10 +0100 Subject: [PATCH] Fix bug where variables could be declared twice --- 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 6a0f562ba..9407a84ef 100644 --- a/tgt-vhdl/stmt.cc +++ b/tgt-vhdl/stmt.cc @@ -185,7 +185,7 @@ static int draw_assign(vhdl_process *proc, stmt_container *container, // As with non-blocking assignment, push constant assignments // into the initialisation if we can if (proc->is_initial() && ivl_signal_port(sig) == IVL_SIP_NONE - && rhs->constant()) { + && rhs->constant() && !proc->have_declared_var(signame)) { decl->set_initial(rhs); // This signal may be used e.g. in a loop test so we need