diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 0771629b4..ad8795e55 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -1799,7 +1799,7 @@ private: UASSERT_OBJ((rstart + rwidth) == lstart, nodep, "tried to merge two selects which are not adjacent"); AstSel* const newselp = new AstSel{ - lselp->fromp()->fileline(), rselp->fromp()->cloneTree(false), rstart, lwidth + rwidth}; + lselp->fromp()->fileline(), rselp->fromp()->unlinkFrBack(), rstart, lwidth + rwidth}; UINFO(5, "merged two adjacent sel " << lselp << " and " << rselp << " to one " << newselp << endl);