Fix queue poping wrong value when otherwise unused (#2512).

This commit is contained in:
Wilson Snyder
2020-11-07 10:37:55 -05:00
parent 7c4259bc0a
commit 2a24bb4759
29 changed files with 164 additions and 86 deletions
+2 -1
View File
@@ -168,7 +168,8 @@ private:
for (; nodep; nodep = nodep->nextp()) {
if (VN_IS(nodep, NodeAssign)) {
if (AstVarRef* varrefp = VN_CAST(VN_CAST(nodep, NodeAssign)->lhsp(), VarRef)) {
UASSERT_OBJ(varrefp->access().isWrite(), varrefp, "LHS assignment not lvalue");
UASSERT_OBJ(varrefp->access().isWriteOrRW(), varrefp,
"LHS assignment not lvalue");
if (!varrefp->varp()->user4p()) {
UINFO(4, " FuncAsn " << varrefp << endl);
varrefp->varp()->user4p(varrefp);