Fix initiation of function variables (#3815).

This commit is contained in:
Wilson Snyder
2022-12-23 10:51:52 -05:00
parent afd7c2ae25
commit 3ccb2e0f2d
11 changed files with 126 additions and 25 deletions
+1
View File
@@ -108,6 +108,7 @@ private:
AstVar* const newVarp
= new AstVar{oldVarp->fileline(), oldVarp->varType(), newName, oldVarp};
newVarp->funcLocal(true);
newVarp->noReset(oldVarp->noReset());
funcp->addInitsp(newVarp);
// Fix up all the references within this function