Fix lifetime opt dropping

This commit is contained in:
Wilson Snyder
2019-07-05 22:30:19 -04:00
parent 8612ba2b8d
commit a4b9745e6e
2 changed files with 18 additions and 4 deletions
+1
View File
@@ -304,6 +304,7 @@ private:
AstVarScope* vscp = nodep->varScopep();
if (!vscp) nodep->v3fatalSrc("Scope not assigned");
if (nodep->lvalue()) {
m_sideEffect = true; // $sscanf etc may have RHS vars that are lvalues
m_lifep->complexAssign(vscp);
} else {
m_lifep->varUsageReplace(vscp, nodep); VL_DANGLING(nodep);