Add regression test for module port range mismatch

Check that a range mismatch is detected for non-ANSI module ports when port
direction and data type are declared separately.

An error should be reported and no crash should occur.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-03-13 11:01:09 +01:00
parent 0328fc5a6f
commit 026d552be1
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// Check that range mismatches between port direction and data type are detected
// for module ports. An error should be reported and no crash should occur.
module test;
input [1:0] x;
wire [3:0] x;
wire [3:0] y;
assign y = x;
initial begin
$display("FAILED");
end
endmodule

View File

@ -648,6 +648,7 @@ module_inout_port_type CE ivltests
module_input_port_type CE ivltests
module_output_port_var1 normal ivltests
module_output_port_var2 normal ivltests
module_port_range_mismatch CE ivltests
modulus normal ivltests # wire % and reg % operators
modulus2 normal ivltests # reg % operators
monitor normal ivltests gold=monitor.gold