From 1775c78aa9f84908a7d911be1976b065359d9a6a Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 30 Oct 2007 14:51:13 -0700 Subject: [PATCH] v0_8: clear expression look aside for transient thread. This is a back port of code from the development branch. The problem is that for named blocks (which create a transient thread) the look aside was not being cleared for the new thread. This resulted in an invalid variable reference optimization. --- tgt-vvp/vvp_process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tgt-vvp/vvp_process.c b/tgt-vvp/vvp_process.c index ca6ac310a..6aec0fcf0 100644 --- a/tgt-vvp/vvp_process.c +++ b/tgt-vvp/vvp_process.c @@ -759,6 +759,10 @@ static int show_stmt_block_named(ivl_statement_t net, ivl_scope_t scope) fprintf(vvp_out, " %%jmp t_%u;\n", out_id); fprintf(vvp_out, "t_%u ;\n", sub_id); + /* The statement within the fork is in a new thread, so no + expression lookaside is valid. */ + clear_expression_lookaside(); + rc = show_stmt_block(net, subscope); fprintf(vvp_out, " %%end;\n");