Fix crash on 32-bit Ubuntu, bug670.

This commit is contained in:
Wilson Snyder
2013-09-03 21:40:43 -04:00
parent 9aba617bad
commit d6e8b0263c
4 changed files with 13 additions and 0 deletions
+1
View File
@@ -71,6 +71,7 @@ void V3LinkLevel::modSortByLevel() {
UINFO(9,"modSortByLevel() sorted\n"); // Comment required for gcc4.6.3 / bug666
for (ModVec::iterator it = vec.begin(); it != vec.end(); ++it) {
AstNodeModule* nodep = *it;
nodep->clearIter(); // Because we didn't iterate to find the node pointers, may have a stale m_iterp() needing cleanup
nodep->unlinkFrBack();
}
if (v3Global.rootp()->modulesp()) v3Global.rootp()->v3fatalSrc("Unlink didn't work");