mirror of
https://github.com/verilator/verilator.git
synced 2026-10-05 17:43:31 +02:00
Fix unpacked-in-class pattern assignment
This commit is contained in:
+3
-1
@@ -67,6 +67,8 @@ class SliceVisitor final : public AstNVisitor {
|
||||
nodep->v3error(
|
||||
nodep->prettyTypeName()
|
||||
<< " is not an unpacked array, but is in an unpacked array context");
|
||||
} else {
|
||||
V3Error::incErrors(); // Otherwise might infinite loop
|
||||
}
|
||||
m_assignError = true;
|
||||
return nodep->cloneTree(false); // Likely will cause downstream errors
|
||||
@@ -107,7 +109,7 @@ class SliceVisitor final : public AstNVisitor {
|
||||
: offset));
|
||||
newp = new AstArraySel(nodep->fileline(), snodep->fromp()->cloneTree(false), leOffset);
|
||||
} else if (VN_IS(nodep, ArraySel) || VN_IS(nodep, NodeVarRef) || VN_IS(nodep, NodeSel)
|
||||
|| VN_IS(nodep, CMethodHard)) {
|
||||
|| VN_IS(nodep, CMethodHard) || VN_IS(nodep, MemberSel)) {
|
||||
UINFO(9, " cloneSel(" << elements << "," << offset << ") " << nodep << endl);
|
||||
int leOffset = !arrayp->rangep()->littleEndian()
|
||||
? arrayp->rangep()->elementsConst() - 1 - offset
|
||||
|
||||
Reference in New Issue
Block a user