Fix delayed assignment malformed LHS assertion (#5904).

This commit is contained in:
Wilson Snyder
2025-03-30 17:38:54 -04:00
parent b49351356e
commit f3684a85b9
3 changed files with 19 additions and 7 deletions
+2 -2
View File
@@ -347,8 +347,8 @@ class DelayedVisitor final : public VNVisitor {
arrSelp->bitp(captureVal(scopep, insertp, arrSelp->bitp()->unlinkFrBack(), tmpName));
nodep = arrSelp->fromp();
}
// What remains must be an AstVarRef
UASSERT_OBJ(VN_IS(nodep, VarRef), lhsp, "Malformed LHS in NBA");
// What remains must be an AstVarRef, or some sort of select, we assume can reuse it.
UASSERT_OBJ(nodep->isPure(), lhsp, "Malformed LHS in NBA");
// Now have been converted to use the captured values
return lhsp;
}