diff --git a/Makefile.in b/Makefile.in index e3768580c..d33e4c65f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -214,7 +214,7 @@ test_regress: all_nomsg examples: all_nomsg for p in examples/* ; do \ - $(MAKE) -C $$p VERILATOR_ROOT=`pwd` ; \ + $(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \ done info: $(INFOS) @@ -430,6 +430,14 @@ cppcheck: $(CPPCHECK_DEP) %.cppcheck: %.cpp $(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $< +analyzer-src: + -rm -rf src/obj_dbg + scan-build $(MAKE) -k verilator_coverage_bin_dbg verilator_bin_dbg + +analyzer-include: + -rm -rf examples/*/obj* + scan-build $(MAKE) -k examples + ftp: info install-msg: diff --git a/src/V3ClkGater.cpp b/src/V3ClkGater.cpp index aabf9e868..2ff7800fd 100644 --- a/src/V3ClkGater.cpp +++ b/src/V3ClkGater.cpp @@ -621,7 +621,7 @@ class GaterVisitor : public GaterBaseVisitor { } // Top level we could choose to make multiple gaters, or ORs under the gater // Right now we'll put OR lower down and let other optimizations deal - if (nodep) nodep = new AstOr(eqnp->fileline(),nodep,eqnp); + if (nodep) nodep = new AstOr(nodep->fileline(), nodep, eqnp); else nodep = eqnp; //if (debug()>=9) nodep->dumpTree(cout," followExpr: "); } diff --git a/src/V3Split.cpp b/src/V3Split.cpp index 1fb2aff27..58f36bf05 100644 --- a/src/V3Split.cpp +++ b/src/V3Split.cpp @@ -416,7 +416,7 @@ private: } if (splitAlwaysp) { ++m_statSplits; - AstAlways* alwaysp = new AstAlways(newListp->fileline(), VAlwaysKwd::ALWAYS, NULL, NULL); + AstAlways* alwaysp = new AstAlways(nodep->fileline(), VAlwaysKwd::ALWAYS, NULL, NULL); addAfterp->addNextHere(alwaysp); addAfterp=alwaysp; alwaysp->addStmtp(newListp); } else { diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 3beb19e66..77f3b46b6 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -1727,7 +1727,7 @@ private: } if (patp) { // Determine initial values - vdtypep = memp; + vdtypep = memp; if (vdtypep) {} patp->dtypep(memp); userIterate(patp, WidthVP(memp,BOTH).p()); // See visit(AstPatMember* @@ -3058,9 +3058,9 @@ private: // Underp is used in a self-determined but boolean context, reduce a multibit number to one bit // stage is always BOTH so not passed as argument // underp may change as a result of replacement - if (!underp) underp->v3fatalSrc("Node has no type"); + if (!underp) nodep->v3fatalSrc("Node has no type"); underp = userIterateSubtreeReturnEdits(underp, WidthVP(SELF,BOTH).p()); - if (!underp || !underp->dtypep()) underp->v3fatalSrc("Node has no type"); // Perhaps forgot to do a prelim visit on it? + if (!underp || !underp->dtypep()) nodep->v3fatalSrc("Node has no type"); // Perhaps forgot to do a prelim visit on it? // // For DOUBLE under a logical op, add implied test against zero, never a warning if (underp && underp->isDouble()) { @@ -3101,7 +3101,7 @@ private: // Returns the new underp // Conversion to/from doubles and integers are before iterating. if (stage != FINAL) nodep->v3fatalSrc("Bad state to iterateCheck"); - if (!underp || !underp->dtypep()) underp->v3fatalSrc("Node has no type"); // Perhaps forgot to do a prelim visit on it? + if (!underp || !underp->dtypep()) nodep->v3fatalSrc("Node has no type"); // Perhaps forgot to do a prelim visit on it? if (expDTypep == underp->dtypep()) { // Perfect underp = userIterateSubtreeReturnEdits(underp, WidthVP(SELF,FINAL).p()); } else if (expDTypep->isDouble() && underp->isDouble()) { // Also good