From 1cd72d375ccc53b5d5864ba080e5bf601b88a93c Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 17 Oct 2013 15:41:19 -0700 Subject: [PATCH] Fix the label count for the join_any and join_none cases --- tgt-vvp/vvp_process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tgt-vvp/vvp_process.c b/tgt-vvp/vvp_process.c index bfaa9ff83..fc0078499 100644 --- a/tgt-vvp/vvp_process.c +++ b/tgt-vvp/vvp_process.c @@ -1489,6 +1489,10 @@ static int show_stmt_fork(ivl_statement_t net, ivl_scope_t sscope) unsigned out = transient_id++; unsigned id_base = transient_id; + /* Increment the number of IDs needed before the join count is + * modified by the join_any or join_none code below. */ + transient_id += join_count; + switch (ivl_statement_type(net)) { case IVL_ST_FORK: break; @@ -1509,8 +1513,6 @@ static int show_stmt_fork(ivl_statement_t net, ivl_scope_t sscope) if (scope==0) scope = sscope; - transient_id += join_count; - /* Draw a fork statement for all but one of the threads of the fork/join. Send the threads off to a bit of code where they are implemented. */