diff --git a/src/V3Link.cpp b/src/V3Link.cpp index 3193173ca..d99a16398 100644 --- a/src/V3Link.cpp +++ b/src/V3Link.cpp @@ -604,9 +604,7 @@ private: // Deal with implicit definitions // We used to nodep->allowImplicit() here, but it turns out // normal "assigns" can also make implicit wires. Yuk. - if (AstVarRef* forrefp = nodep->lhsp()->castVarRef()) { - createImplicitVar(forrefp, false); - } + pinImplicitExprRecurse(nodep->lhsp()); nodep->iterateChildren(*this); } virtual void visit(AstAssignAlias* nodep, AstNUser*) { diff --git a/test_regress/t/t_lint_implicit.v b/test_regress/t/t_lint_implicit.v index 9445d0914..5d56d499c 100644 --- a/test_regress/t/t_lint_implicit.v +++ b/test_regress/t/t_lint_implicit.v @@ -11,5 +11,8 @@ module t (a,z); or OR0 (nt0, a, b); + logic [1:0] dummy_ip; + assign {dummy1, dummy2} = dummy_ip; + assign z = nt0; endmodule diff --git a/test_regress/t/t_lint_implicit_bad.pl b/test_regress/t/t_lint_implicit_bad.pl index b3ec298e4..79949a35b 100755 --- a/test_regress/t/t_lint_implicit_bad.pl +++ b/test_regress/t/t_lint_implicit_bad.pl @@ -16,6 +16,8 @@ compile ( '%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: b %Warning-IMPLICIT: Use .* to disable this message. %Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: nt0 +%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy1 +%Warning-IMPLICIT: t/t_lint_implicit.v:\d+: Signal definition not found, creating implicitly: dummy2 %Error: Exiting due to.*', ) if $Self->{v3};