Fix bad-syntax crasses, bug1583, bug1585.

This commit is contained in:
Wilson Snyder 2019-11-04 19:06:55 -05:00
parent 67d52372e5
commit 055a978866
2 changed files with 8 additions and 4 deletions

View File

@ -27,7 +27,7 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix multithreaded yield behavior when no work. [Patrick Stewart]
**** Fix bad-syntax crashes, bug1548, bug1550-1553, bug1557-1560, bug1563,
bug1573-1577, bug1582. [Eric Rippey]
bug1573-1577, bug1582-1585. [Eric Rippey]
**** Fix false CMPCONST/UNSIGNED warnings on "inside", bug1581. [Mitch Hayenga]

View File

@ -1780,9 +1780,12 @@ private:
nodep->dtypep(m_vup->dtypep());
}
AstNodeDType* vdtypep = nodep->dtypep();
if (!vdtypep) nodep->v3error("Unsupported/Illegal: Assignment pattern"
" member not underneath a supported construct: "
<<nodep->backp()->prettyTypeName());
if (!vdtypep) {
nodep->v3error("Unsupported/Illegal: Assignment pattern"
" member not underneath a supported construct: "
<<nodep->backp()->prettyTypeName());
return;
}
{
vdtypep = vdtypep->skipRefp();
nodep->dtypep(vdtypep);
@ -2469,6 +2472,7 @@ private:
userIterateAndNext(nodep->exprp(), WidthVP(nodep->modVarp()->dtypep(), PRELIM).p());
AstNodeDType* pinDTypep = nodep->modVarp()->dtypep();
AstNodeDType* conDTypep = nodep->exprp()->dtypep();
if (!conDTypep) nodep->v3fatalSrc("Unlinked pin data type");
AstNodeDType* subDTypep = pinDTypep;
int pinwidth = pinDTypep->width();
int conwidth = conDTypep->width();