diff --git a/Changes b/Changes index bfe27ed5c..4b756d649 100644 --- a/Changes +++ b/Changes @@ -21,6 +21,7 @@ Verilator 5.009 devel * Fix UNDRIVEN warning seg fault (#3989). [Felix Neumärker] * Fix symbol entries when inheriting classes (#3995) (#3996). [Krzysztof Boroński] * Fix push to dynamic queue in struct (#4015). [ezchi] +* Fix clocking block scope internal error (#4032). [Srinivasan Venkataramanan] * Fix false ENUMVALUE on expressions and arrays. diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index e10bc172b..2dd807015 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -255,7 +255,7 @@ private: iterateChildren(nodep); if (nodep->varsp()) m_scopep->modp()->addStmtsp(nodep->varsp()->unlinkFrBackWithNext()); if (nodep->eventp()) m_scopep->modp()->addStmtsp(nodep->eventp()->unlinkFrBack()); - VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep); + VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep); } void visit(AstNodeFTask* nodep) override { // Add to list of blocks under this scope