Fix forceable unpacked array element force with procedural assign (#8084) (#8085)

This commit is contained in:
Nikolai Kumar
2026-08-11 17:09:33 -04:00
committed by GitHub
parent e96cfc5e56
commit da0c31926e
3 changed files with 58 additions and 0 deletions
+6
View File
@@ -1400,6 +1400,12 @@ class ForceReplaceVisitor final : public VNVisitor {
iterateChildren(nodep);
return;
}
if (m_state.doingAssign() && varInfo->m_forceRdVscp) {
baseRefp->varp(varInfo->m_forceRdVscp->varp());
baseRefp->varScopep(varInfo->m_forceRdVscp);
iterateChildren(nodep);
return;
}
const ForceState::ArraySelInfo arrayInfo = ForceState::getArraySelInfo(nodep);
// Substitute forced reads inside the index expressions before anything is cloned,
// so the fallback value and the flattened index use the same, force-aware index.