Fix elimination, bug610 _2 test.

This commit is contained in:
Wilson Snyder 2013-02-03 14:13:16 -05:00
parent 61ad9d4651
commit 936855c81c
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ private:
AstNodeModule* nextmodp;
for (AstNodeModule* modp = v3Global.rootp()->modulesp(); modp; modp=nextmodp) {
nextmodp = modp->nextp()->castNodeModule();
if (modp->level()>2 && modp->user1()==0) {
if (modp->level()>2 && modp->user1()==0 && !modp->internal()) {
// > 2 because L1 is the wrapper, L2 is the top user module
UINFO(4," Dead module "<<modp<<endl);
// And its children may now be killable too; correct counts