Fix `co_await VlNow{}` being added too many times (#3596)

(or not at all)

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
This commit is contained in:
Krzysztof Bieganski 2022-09-05 12:46:34 +02:00 committed by GitHub
parent da7ad35577
commit 8b19d02e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ void transformForks(AstNetlist* const netlistp) {
// We can just pass it to the new function
} else if (m_forkp->joinType().join()) {
// If it's fork..join, we can refer to variables from the parent process
if (m_funcp->user1SetOnce()) { // Only do this once per function
if (!m_funcp->user1SetOnce()) { // Only do this once per function
// Move all locals to the heap before the fork
auto* const awaitp = new AstCAwait{
m_forkp->fileline(), new AstCStmt{m_forkp->fileline(), "VlNow{}"}};