Fix bug where variables could be declared twice

This commit is contained in:
Nick Gasson 2008-06-23 15:13:10 +01:00
parent 88dc9b6b63
commit f261bf7e97
1 changed files with 1 additions and 1 deletions

View File

@ -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