Fix IMPURE errors due to X-assignment temporary variables.

This commit is contained in:
Wilson Snyder
2008-07-14 10:42:58 -04:00
parent a4f3199427
commit 5771ea48ef
7 changed files with 143 additions and 5 deletions
+2 -1
View File
@@ -208,7 +208,8 @@ private:
virtual void visit(AstVarRef* nodep, AstNUser*) {
nodep->iterateChildren(*this);
if (nodep->varp()->user4p() != m_curVxp) {
if (m_curVxp->pure()) {
if (m_curVxp->pure()
&& !nodep->varp()->isPure()) {
m_curVxp->impure(nodep);
}
}