Fix generate if, broke in earlier committ, bug492. Merge from Bennett.

This commit is contained in:
Wilson Snyder
2012-04-25 18:17:10 -04:00
parent f3867d7f80
commit 5b532a1812
3 changed files with 95 additions and 1 deletions
+5 -1
View File
@@ -369,7 +369,11 @@ private:
// Extraction checks
bool warnSelect(AstSel* nodep) {
AstNode* basefromp = AstArraySel::baseFromp(nodep);
if (m_doGenerate) V3Width::widthParamsEdit(nodep); // Never checked yet
if (m_doGenerate) {
// Never checked yet
V3Width::widthParamsEdit(nodep);
nodep->iterateChildren(*this); // May need "constifying"
}
if (AstNodeVarRef* varrefp = basefromp->castNodeVarRef()) {
AstVar* varp = varrefp->varp();
if (!varp->dtypep()) varp->v3fatalSrc("Data type lost");