diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 4befae6ed..2cb1d0660 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -2755,7 +2755,7 @@ class WidthVisitor final : public VNVisitor { VL_DO_DANGLING(fromp->deleteTree(), fromp); } } - userIterateAndNext(nodep->fromp(), WidthVP{SELF, PRELIM}.p()); + userIterateAndNext(nodep->fromp(), WidthVP{SELF, PRELIM, STREAM_USE_CAST}.p()); UINFOTREE(9, nodep, "", "CastDit"); AstNodeDType* const toDtp = nodep->dtypep()->skipRefToEnump(); AstNodeDType* const fromDtp = nodep->fromp()->dtypep()->skipRefToEnump(); @@ -2881,7 +2881,7 @@ class WidthVisitor final : public VNVisitor { nodep->v3error("Size-changing cast to zero or negative size: " << width); width = 1; } - userIterateAndNext(nodep->lhsp(), WidthVP{SELF, PRELIM}.p()); + userIterateAndNext(nodep->lhsp(), WidthVP{SELF, PRELIM, STREAM_USE_CAST}.p()); castSized(nodep, nodep->lhsp(), width); // lhsp may change } if (m_vup->final()) { @@ -2894,7 +2894,7 @@ class WidthVisitor final : public VNVisitor { } void visit(AstCastWrap* nodep) override { // Inserted by V3Width only so we know has been resolved - userIterateAndNext(nodep->lhsp(), WidthVP{nodep->dtypep(), BOTH}.p()); + userIterateAndNext(nodep->lhsp(), WidthVP{nodep->dtypep(), BOTH, STREAM_USE_CAST}.p()); } void castSized(AstNode* nodep, AstNode* underp, int width) { const AstBasicDType* underDtp = VN_CAST(underp->dtypep(), BasicDType); @@ -2915,7 +2915,7 @@ class WidthVisitor final : public VNVisitor { nodep->dtypep(calcDtp); // We ignore warnings as that is sort of the point of a cast iterateCheck(nodep, "Cast expr", underp, CONTEXT_DET, FINAL, calcDtp, EXTEND_EXP, - false); + false, STREAM_USE_CAST); VL_DANGLING(underp); underp = nodep->op1p(); // Above asserts that op1 was underp pre-relink }