Fix warnings to point to lowest net usage, not upper level ports.

This commit is contained in:
Wilson Snyder 2011-01-17 14:10:01 -05:00
parent fab7924cc2
commit 8287cf35e7
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix block comment not separating identifiers, bug311. [Gene Sullivan]
**** Fix warnings to point to lowest net usage, not upper level ports.
* Verilator 3.810 2011/01/03
** Add limited support for VPI access to public signals, see docs.

View File

@ -719,6 +719,12 @@ private:
// Prevent a infinite loop...
substp->v3fatalSrc("Replacing node with itself; perhaps circular logic?");
}
// Which fileline() to use?
// If replacing with logic, an error/warning is likely to want to point to the logic
// IE what we're replacing with.
// However a VARREF should point to the original as it's otherwise confusing
// to throw warnings that point to a PIN rather than where the pin us used.
if (substp->castVarRef()) substp->fileline(nodep->fileline());
nodep->replaceWith(substp);
nodep->deleteTree(); nodep=NULL;
}