Fix ENUMVALUE on parameter, again (#3777).
This commit is contained in:
parent
01b521a0ea
commit
609bfa46e8
|
|
@ -1979,7 +1979,7 @@ private:
|
||||||
}
|
}
|
||||||
void visit(AstCastWrap* nodep) override {
|
void visit(AstCastWrap* nodep) override {
|
||||||
// Inserted by V3Width only so we know has been resolved
|
// Inserted by V3Width only so we know has been resolved
|
||||||
UASSERT_OBJ(nodep->didWidth(), nodep, "CastWrap should have width'ed earlier");
|
userIterateAndNext(nodep->lhsp(), WidthVP{nodep->dtypep(), BOTH}.p());
|
||||||
}
|
}
|
||||||
void castSized(AstNode* nodep, AstNode* underp, int width) {
|
void castSized(AstNode* nodep, AstNode* underp, int width) {
|
||||||
const AstBasicDType* underDtp = VN_CAST(underp->dtypep(), BasicDType);
|
const AstBasicDType* underDtp = VN_CAST(underp->dtypep(), BasicDType);
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,13 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
scenarios(linter => 1);
|
scenarios(simulator => 1);
|
||||||
|
|
||||||
lint(
|
compile(
|
||||||
|
);
|
||||||
|
|
||||||
|
execute(
|
||||||
|
check_finished => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
ok(1);
|
ok(1);
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,21 @@ module SubB
|
||||||
();
|
();
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
function automatic letters_t lfunc(int a);
|
||||||
|
return letters_t'(1);
|
||||||
|
endfunction
|
||||||
|
|
||||||
module t ();
|
module t ();
|
||||||
|
localparam FMT = lfunc(1);
|
||||||
|
|
||||||
SubA suba0 ();
|
SubA suba0 ();
|
||||||
SubA #(.LETTER(letters_t'(1))) suba1 ();
|
SubA #(.LETTER(letters_t'(1))) suba1 ();
|
||||||
SubB #(.LETTER(letters_t'(1))) subb2 ();
|
SubB #(.LETTER(letters_t'(1))) subb2 ();
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
if (lfunc(1) != B) $stop;
|
||||||
|
if (FMT != B) $stop;
|
||||||
|
$write("*-* All Finished *-*\n");
|
||||||
|
$finish;
|
||||||
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue