mirror of
https://github.com/verilator/verilator.git
synced 2026-08-30 01:38:21 +02:00
Fix std::randomize inside {typedef array} internal error (#7481)
Fixes #7481.
This commit is contained in:
+3
-1
@@ -964,7 +964,9 @@ class ConstraintExprVisitor final : public VNVisitor {
|
||||
|
||||
AstNodeExpr* newSel(FileLine* fl, AstNodeExpr* arrayp, AstNodeExpr* idxp) {
|
||||
// similar to V3WidthSel.cpp
|
||||
AstNodeDType* const arrDtp = arrayp->unlinkFrBack()->dtypep();
|
||||
// skipRefp() unwraps typedef wrappers (AstRefDType) so the dtype kind
|
||||
// checks below recognize types spelled as `typedef <scalar> <name>[$]`.
|
||||
AstNodeDType* const arrDtp = arrayp->unlinkFrBack()->dtypep()->skipRefp();
|
||||
AstNodeExpr* selp = nullptr;
|
||||
if (VN_IS(arrDtp, QueueDType) || VN_IS(arrDtp, DynArrayDType))
|
||||
selp = new AstCMethodHard{fl, arrayp, VCMethod::ARRAY_AT, idxp};
|
||||
|
||||
Reference in New Issue
Block a user