mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 18:58:51 +02:00
Fix of deleting linked node in V3Randomize (#6718)
Signed-off-by: Igor Zaworski <[email protected]>
This commit is contained in:
+2
-2
@@ -900,7 +900,7 @@ class ConstraintExprVisitor final : public VNVisitor {
|
||||
// Track this variable path as written
|
||||
if (isGlobalConstrained) m_writtenVars.insert(smtName);
|
||||
// For global constraints, delete nodep after processing
|
||||
if (isGlobalConstrained) VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
if (isGlobalConstrained && !nodep->backp()) VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
AstCMethodHard* const methodp = new AstCMethodHard{
|
||||
varp->fileline(),
|
||||
new AstVarRef{varp->fileline(), VN_AS(m_genp->user2p(), NodeModule), m_genp,
|
||||
@@ -958,7 +958,7 @@ class ConstraintExprVisitor final : public VNVisitor {
|
||||
// Variable already written, clean up cloned membersel if any
|
||||
if (membersel) VL_DO_DANGLING(membersel->deleteTree(), membersel);
|
||||
// Delete nodep if it's a global constraint (not deleted yet)
|
||||
if (isGlobalConstrained) VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
if (isGlobalConstrained && !nodep->backp()) VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
}
|
||||
void visit(AstCountOnes* nodep) override {
|
||||
|
||||
Reference in New Issue
Block a user