mirror of
https://github.com/verilator/verilator.git
synced 2025-01-09 08:07:46 +00:00
Fix dtype indexing into arrays, bug1007.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
parent
5613758ee3
commit
373a68ec8b
@ -262,10 +262,11 @@ private:
|
|||||||
AstVarXRef *newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true);
|
AstVarXRef *newp = new AstVarXRef(nodep->fileline(),varrefp->name () + "__BRA__" + index + "__KET__", "", true);
|
||||||
AstVar *varp = varrefp->varp()->cloneTree(true);
|
AstVar *varp = varrefp->varp()->cloneTree(true);
|
||||||
varp->name(varp->name() + "__TMP__" + "__BRA__" + index + "__KET__");
|
varp->name(varp->name() + "__TMP__" + "__BRA__" + index + "__KET__");
|
||||||
varp->dtypep(arrp->subDTypep()->backp()->castIfaceRefDType());
|
if (!nodep->modVarp()->dtypep()) nodep->v3fatalSrc("No dtype for AstPin");
|
||||||
|
varp->dtypep(nodep->modVarp()->dtypep());
|
||||||
newp->addNextHere(varp);
|
newp->addNextHere(varp);
|
||||||
newp->varp(varp);
|
newp->varp(varp);
|
||||||
newp->dtypep(arrp->subDTypep()->castIfaceRefDType());
|
newp->dtypep(nodep->modVarp()->dtypep());
|
||||||
newp->packagep(varrefp->packagep());
|
newp->packagep(varrefp->packagep());
|
||||||
arrselp->addNextHere(newp);
|
arrselp->addNextHere(newp);
|
||||||
arrselp->unlinkFrBack()->deleteTree();
|
arrselp->unlinkFrBack()->deleteTree();
|
||||||
|
Loading…
Reference in New Issue
Block a user