From daf19e241e00e12f8ce1bb93e886b09970806ac9 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sat, 21 Dec 2013 06:46:48 -0500 Subject: [PATCH] Fix struct trace coredump from recent commit. --- src/V3Dead.cpp | 10 +++------- test_regress/driver.pl | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/V3Dead.cpp b/src/V3Dead.cpp index a20265e14..ae8984189 100644 --- a/src/V3Dead.cpp +++ b/src/V3Dead.cpp @@ -103,7 +103,9 @@ private: } void checkDType(AstNodeDType* nodep) { if (!nodep->generic() // Don't remove generic types - && m_elimDTypes) { // dtypes stick around until post-widthing + && m_elimDTypes // dtypes stick around until post-widthing + && !nodep->castMemberDType() // Keep member names iff upper type exists + ) { m_varEtcsp.push_back(nodep); } if (AstNode* subnodep = nodep->virtRefDTypep()) subnodep->user1Inc(); @@ -144,12 +146,6 @@ private: nodep->packagep()->user1Inc(); } } - virtual void visit(AstMemberDType* nodep, AstNUser*) { - // Keep member names iff upper type exists - nodep->iterateChildren(*this); - // No checkDType(nodep) - checkAll(nodep); - } virtual void visit(AstNodeDType* nodep, AstNUser*) { nodep->iterateChildren(*this); checkDType(nodep); diff --git a/test_regress/driver.pl b/test_regress/driver.pl index d47684e53..097eab5f1 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -226,7 +226,7 @@ sub parameter { push @Opt_Driver_Verilator_Flags, $param; $_Parameter_Next_Level = $param; } - elsif ($param =~ /^-?-W/) { + elsif ($param =~ /^-?(-W||-debug-check)/) { push @Opt_Driver_Verilator_Flags, $param; } else {