Fix internal error on dotted refs into generates, bug958.

This commit is contained in:
Wilson Snyder
2015-09-18 20:57:27 -04:00
parent d0ec991bb2
commit 7163c8d048
5 changed files with 73 additions and 3 deletions
+10 -3
View File
@@ -186,11 +186,15 @@ private:
// NODE STATE
// Nothing! // This may be called deep inside other routines
// // so userp and friends may not be used
// VISITORS
virtual void visit(AstNode* nodep, AstNUser*) {
// METHODS
void processAndIterate(AstNode* nodep) {
BrokenTable::addInTree(nodep, nodep->maybePointedTo());
nodep->iterateChildrenConst(*this);
}
// VISITORS
virtual void visit(AstNode* nodep, AstNUser*) {
processAndIterate(nodep);
}
public:
// CONSTUCTORS
BrokenMarkVisitor(AstNetlist* nodep) {
@@ -210,7 +214,7 @@ private:
nodep->v3fatalSrc("Width != WidthMin");
}
}
virtual void visit(AstNode* nodep, AstNUser*) {
void processAndIterate(AstNode* nodep) {
BrokenTable::setUnder(nodep,true);
if (const char* whyp=nodep->broken()) {
nodep->v3fatalSrc("Broken link in node (or something without maybePointedTo): "<<whyp);
@@ -232,6 +236,9 @@ private:
nodep->iterateChildrenConst(*this);
BrokenTable::setUnder(nodep,false);
}
virtual void visit(AstNode* nodep, AstNUser*) {
processAndIterate(nodep);
}
public:
// CONSTUCTORS
BrokenCheckVisitor(AstNetlist* nodep) {