diff --git a/src/V3Dead.cpp b/src/V3Dead.cpp index 4ca7c6424..ba7c08a8f 100644 --- a/src/V3Dead.cpp +++ b/src/V3Dead.cpp @@ -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 "<