Internals: Track some VAccess that can be ReadOnly. No functional change.

This commit is contained in:
Wilson Snyder
2020-10-30 22:28:51 -04:00
parent 51b0963e61
commit cf7b5c091a
9 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ private:
}
}
virtual void visit(AstVarRef* nodep) override {
if (nodep->access().isRead() && !VN_IS(nodep->backp(), CCast)
if (nodep->access().isReadOnly() && !VN_IS(nodep->backp(), CCast)
&& VN_IS(nodep->backp(), NodeMath) && !VN_IS(nodep->backp(), ArraySel)
&& nodep->backp()->width() && castSize(nodep) != castSize(nodep->varp())) {
// Cast vars to IData first, else below has upper bits wrongly set