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
+1 -1
View File
@@ -80,7 +80,7 @@ private:
virtual void visit(AstVarRef* nodep) override {
if (!m_mergeable) return;
// Clear if it's an LValue referencing a marked variable
if (nodep->access().isWrite() && nodep->varp()->user1()) {
if (nodep->access().isWriteOrRW() && nodep->varp()->user1()) {
clearMergeable(nodep, "might modify condition");
}
}