Set lifetime for repeat variable (#4451 partial)

This commit is contained in:
Wilson Snyder 2023-08-31 18:34:37 -04:00
parent 8c480fd39e
commit 2f90fb2bec

View File

@ -196,6 +196,7 @@ private:
// Spec says value is integral, if negative is ignored
AstVar* const varp
= new AstVar{nodep->fileline(), VVarType::BLOCKTEMP, name, nodep->findSigned32DType()};
varp->lifetime(VLifetime::AUTOMATIC);
varp->usedLoopIdx(true);
m_modp->addStmtsp(varp);
AstNode* initsp = new AstAssign{