Fix missing error when parameter assigned to type, bug1575.
This commit is contained in:
parent
171960635e
commit
8ce60e955f
2
Changes
2
Changes
|
@ -25,7 +25,7 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
**** Fix multithreaded yield behavior when no work. [Patrick Stewart]
|
**** Fix multithreaded yield behavior when no work. [Patrick Stewart]
|
||||||
|
|
||||||
**** Fix bad-syntax crashes, bug1548, bug1550-1553, bug1557-1560, bug1563,
|
**** Fix bad-syntax crashes, bug1548, bug1550-1553, bug1557-1560, bug1563,
|
||||||
bug1573, bug1574. [Eric Rippey]
|
bug1573-1575. [Eric Rippey]
|
||||||
|
|
||||||
**** Benchmark --protect-lib runtime, bug1519. [Todd Strader]
|
**** Benchmark --protect-lib runtime, bug1519. [Todd Strader]
|
||||||
|
|
||||||
|
|
|
@ -3491,6 +3491,10 @@ private:
|
||||||
} else if (expDTypep->isString() && !underp->dtypep()->isString()) {
|
} else if (expDTypep->isString() && !underp->dtypep()->isString()) {
|
||||||
underp = spliceCvtString(underp);
|
underp = spliceCvtString(underp);
|
||||||
underp = userIterateSubtreeReturnEdits(underp, WidthVP(SELF, FINAL).p());
|
underp = userIterateSubtreeReturnEdits(underp, WidthVP(SELF, FINAL).p());
|
||||||
|
} else if (VN_IS(underp, NodeDType)) { // Note the node itself, not node's data type
|
||||||
|
underp->v3error(ucfirst(nodep->prettyOperatorName())
|
||||||
|
<<" expected non-datatype "<<side
|
||||||
|
<<" but '"<<underp->name()<<"' is a datatype.");
|
||||||
} else {
|
} else {
|
||||||
AstBasicDType* expBasicp = expDTypep->basicp();
|
AstBasicDType* expBasicp = expDTypep->basicp();
|
||||||
AstBasicDType* underBasicp = underp->dtypep()->basicp();
|
AstBasicDType* underBasicp = underp->dtypep()->basicp();
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
%Error: t/t_param_type_bad.v:8: Parameter type's initial value isn't a type: 'bad2'
|
||||||
|
localparam type bad2 = 2;
|
||||||
|
^~~~
|
||||||
|
%Error: Exiting due to
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/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(vlt => 1);
|
||||||
|
|
||||||
|
lint(
|
||||||
|
# Bug1575 required trace to crash
|
||||||
|
verilator_flags2 => ["--trace"],
|
||||||
|
fails => 1,
|
||||||
|
expect_filename => $Self->{golden_filename},
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
|
@ -0,0 +1,9 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2019 by Wilson Snyder.
|
||||||
|
|
||||||
|
module t;
|
||||||
|
localparam type t = logic; // Fine
|
||||||
|
localparam type bad2 = 2; // Bad
|
||||||
|
endmodule
|
|
@ -0,0 +1,4 @@
|
||||||
|
%Error: t/t_param_type_bad2.v:8: Parameter type's initial value isn't a type: 'bad2'
|
||||||
|
localparam type bad2 = 2;
|
||||||
|
^~~~
|
||||||
|
%Error: Exiting due to
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/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(vlt => 1);
|
||||||
|
|
||||||
|
lint(
|
||||||
|
# Bug1575 required trace to crash
|
||||||
|
verilator_flags2 => ["--trace"],
|
||||||
|
fails => 1,
|
||||||
|
expect_filename => $Self->{golden_filename},
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
|
@ -0,0 +1,9 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2019 by Wilson Snyder.
|
||||||
|
|
||||||
|
module t;
|
||||||
|
localparam type t = logic; // Fine
|
||||||
|
localparam type bad2 = 2; // Bad
|
||||||
|
endmodule
|
Loading…
Reference in New Issue