diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index 88550f41d..d12a3a93c 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -1501,10 +1501,10 @@ class ConstraintExprVisitor final : public VNVisitor { = VN_AS(varp->dtypep()->skipRefp(), UnpackArrayDType)->elementsConst(); sizep = new AstConst{fl, static_cast(arraySize)}; } else { - AstVarRef* const arraySizeRef = new AstVarRef{fl, varClassp, varp, VAccess::READ}; - arraySizeRef->classOrPackagep(classOrPackagep); + AstVarRef* const arraySizeRefp = new AstVarRef{fl, varClassp, varp, VAccess::READ}; + arraySizeRefp->classOrPackagep(classOrPackagep); AstCMethodHard* const dynSizep - = new AstCMethodHard{fl, arraySizeRef, VCMethod::DYN_SIZE, nullptr}; + = new AstCMethodHard{fl, arraySizeRefp, VCMethod::DYN_SIZE, nullptr}; dynSizep->dtypeSetUInt32(); sizep = dynSizep; }