diff --git a/Changes b/Changes index 36e23ddb2..85f7f900c 100644 --- a/Changes +++ b/Changes @@ -27,7 +27,7 @@ The contributors that suggested a given feature are shown in []. Thanks! **** Fix multithreaded yield behavior when no work. [Patrick Stewart] **** Fix bad-syntax crashes, bug1548, bug1550-1553, bug1557-1560, bug1563, - bug1573-1577, bug1582-1585, bug1590-1591. [Eric Rippey] + bug1573-1577, bug1582-1585, bug1589-1591. [Eric Rippey] **** Fix false CMPCONST/UNSIGNED warnings on "inside", bug1581. [Mitch Hayenga] diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 97f5f61f5..a7f87b338 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -849,8 +849,8 @@ class LinkDotFindVisitor : public AstNVisitor { VSymEnt* okSymp; aboveSymp = m_statep->findDotted(aboveSymp, scope, baddot, okSymp); UASSERT_OBJ(aboveSymp, nodep, - "Can't find cell insertion point at '" - <prettyNameQ()); + "Can't find cell insertion point at " + <prettyNameQ()); } { m_scope = m_scope+"."+nodep->name(); @@ -880,8 +880,8 @@ class LinkDotFindVisitor : public AstNVisitor { VSymEnt* okSymp; aboveSymp = m_statep->findDotted(aboveSymp, dotted, baddot, okSymp); UASSERT_OBJ(aboveSymp, nodep, - "Can't find cellinline insertion point at '" - <prettyNameQ()); + "Can't find cellinline insertion point at " + <prettyNameQ()); m_statep->insertInline(aboveSymp, m_modSymp, nodep, ident); } else { // No __DOT__, just directly underneath m_statep->insertInline(aboveSymp, m_modSymp, nodep, nodep->name()); @@ -2143,9 +2143,10 @@ private: <<": "<prettyNameQ()<warnMore()+suggest)); } else { - nodep->v3error("Can't find definition of '" - <<(baddot!="" ? baddot : nodep->prettyName()) - <<"' in dotted "<v3error("Can't find definition of " + <<(!baddot.empty() ? AstNode::prettyNameQ(baddot) + : nodep->prettyNameQ()) + <<" in dotted "<prettyName()<<"'"); if (okSymp) { okSymp->cellErrorScopes(nodep, AstNode::prettyName(m_ds.m_dotText)); @@ -2204,8 +2205,8 @@ private: string inl = AstNode::dedotName(nodep->inlinedDots()); dotSymp = m_statep->findDotted(dotSymp, inl, baddot, okSymp); UASSERT_OBJ(dotSymp, nodep, - "Couldn't resolve inlined scope '" - <inlinedDots()); + "Couldn't resolve inlined scope " + <inlinedDots()); } dotSymp = m_statep->findDotted(dotSymp, nodep->dotted(), baddot, okSymp); // Maybe NULL if (!m_statep->forScopeCreation()) { @@ -2214,10 +2215,11 @@ private: nodep->varp(varp); UINFO(7," Resolved "<varp()) { - nodep->v3error("Can't find definition of '" - <v3error("Can't find definition of " + <dotted()+"."+nodep->prettyName()<<"'"); okSymp->cellErrorScopes(nodep); + return; } // V3Inst may have expanded arrays of interfaces to // AstVarXRef's even though they are in the same module detect @@ -2235,8 +2237,9 @@ private: VSymEnt* foundp = m_statep->findSymPrefixed(dotSymp, nodep->name(), baddot); AstVarScope* vscp = foundp ? VN_CAST(foundp->nodep(), VarScope) : NULL; if (!vscp) { - nodep->v3error("Can't find varpin scope of '"<v3error("Can't find varpin scope of " + <dotted()+"."+nodep->prettyName()<<"'"); okSymp->cellErrorScopes(nodep); } else { @@ -2342,8 +2345,9 @@ private: dotSymp = m_statep->findDotted(dotSymp, inl, baddot, okSymp); if (!dotSymp) { okSymp->cellErrorScopes(nodep); - nodep->v3fatalSrc("Couldn't resolve inlined scope '" - <inlinedDots()); + nodep->v3fatalSrc("Couldn't resolve inlined scope " + <inlinedDots()); } } dotSymp = m_statep->findDotted(dotSymp, nodep->dotted(), @@ -2374,8 +2378,9 @@ private: } else { string suggest = m_statep->suggestSymFallback( dotSymp, nodep->name(), LinkNodeMatcherFTask()); - nodep->v3error("Can't find definition of '"<v3error("Can't find definition of " + <dotted()+"."+nodep->prettyName()<<"'\n" <<(suggest.empty() ? "" : nodep->warnMore()+suggest)); okSymp->cellErrorScopes(nodep); diff --git a/test_regress/t/t_fuzz_genintf_bad.out b/test_regress/t/t_fuzz_genintf_bad.out new file mode 100644 index 000000000..68af1a752 --- /dev/null +++ b/test_regress/t/t_fuzz_genintf_bad.out @@ -0,0 +1,9 @@ +%Error: t/t_fuzz_genintf_bad.v:23: Unsupported: Member call on non-enum object 'VARREF 'j'' which is a 'BASICDTYPE 'integer'' + : ... In instance t + j.e(0), + ^ +%Error: Internal Error: t/t_fuzz_genintf_bad.v:23: ../V3Width.cpp:#: Unlinked pin data type + : ... In instance t + j.e(0), + ^ + ... See the manual and http://www.veripool.org/verilator for more assistance. diff --git a/test_regress/t/t_fuzz_genintf_bad.pl b/test_regress/t/t_fuzz_genintf_bad.pl new file mode 100755 index 000000000..b09f43e8b --- /dev/null +++ b/test_regress/t/t_fuzz_genintf_bad.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2003 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. + +scenarios(linter => 1); + +lint( + fails => 1, + expect_filename => $Self->{golden_filename}, + ); + +ok(1); +1; diff --git a/test_regress/t/t_fuzz_genintf_bad.v b/test_regress/t/t_fuzz_genintf_bad.v new file mode 100644 index 000000000..5069935cc --- /dev/null +++ b/test_regress/t/t_fuzz_genintf_bad.v @@ -0,0 +1,28 @@ +// DESCRIPTION: Verilator: Verilog Test module +// +// This file ONLY is placed into the Public Domain, for any use, +// without warranty, 2019 by Wilson Snyder. + +//bug1588 +interface intf; + logic a; + modport source(output a); +endinterface + +module m1 + ( + input logic value, + intf.source b + ); +endmodule + +module t; + intf ifs; + + m1 m0( + j.e(0), + .b(ifs) + ); + + genvar j; +endmodule