From ef71576825f89657be6740c5dff96187aa0a35a7 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 3 Jun 2020 08:30:49 -0400 Subject: [PATCH] Fix coredump from increment patch (#2391) --- src/V3LinkInc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/V3LinkInc.cpp b/src/V3LinkInc.cpp index 9c8a645b1..73dbe7ab5 100644 --- a/src/V3LinkInc.cpp +++ b/src/V3LinkInc.cpp @@ -190,7 +190,8 @@ private: // Prepare a temporary variable FileLine* fl = backp->fileline(); string name = string("__Vincrement") + cvtToStr(++m_modIncrementsNum); - AstVar* varp = new AstVar(fl, AstVarType::BLOCKTEMP, name, varrefp->varp()->subDTypep()); + AstVar* varp = new AstVar(fl, AstVarType::BLOCKTEMP, name, VFlagChildDType(), + varrefp->varp()->subDTypep()->cloneTree(true)); // Declare the variable insertBeforeStmt(nodep, varp);