Fix stripping on randomize (#6144 partial)

This commit is contained in:
Wilson Snyder 2025-07-01 08:57:08 -04:00
parent 73da5e51a6
commit e015805194
1 changed files with 4 additions and 1 deletions

View File

@ -6300,7 +6300,10 @@ class WidthVisitor final : public VNVisitor {
}
}
UASSERT_OBJ(nodep->taskp(), nodep, "Unlinked");
if (nodep->didWidth()) return;
if (nodep->didWidth()) {
nodep->addPinsp(withp);
return;
}
if ((nodep->taskp()->classMethod() && !nodep->taskp()->isStatic())
&& !VN_IS(m_procedurep, InitialAutomatic)
&& (!m_ftaskp || !m_ftaskp->classMethod() || m_ftaskp->isStatic()) && !m_constraintp) {