diff --git a/src/V3LinkInc.cpp b/src/V3LinkInc.cpp index 3fbb7999a..a770b7017 100644 --- a/src/V3LinkInc.cpp +++ b/src/V3LinkInc.cpp @@ -309,6 +309,7 @@ class LinkIncVisitor final : public VNVisitor { AstVar* const varp = new AstVar{ fl, VVarType::BLOCKTEMP, name, VFlagChildDType{}, new AstRefDType{fl, AstRefDType::FlagTypeOfExpr{}, readp->cloneTree(true)}}; + varp->lifetime(VLifetime::AUTOMATIC_EXPLICIT); if (m_ftaskp) varp->funcLocal(true); // Declare the variable