diff --git a/ivtest/ivltests/task_port_range_mismatch.v b/ivtest/ivltests/task_port_range_mismatch.v new file mode 100644 index 000000000..6ba4abc25 --- /dev/null +++ b/ivtest/ivltests/task_port_range_mismatch.v @@ -0,0 +1,18 @@ +// Check that range mismatches between port direction and data type are detected +// for task ports. An error should be reported and no crash should occur. + +module test; + + task t; + input [1:0] x; + reg [3:0] x; + reg [3:0] y; + y = x; + $display("FAILED"); + endtask + + initial begin + t(4'b1001); + end + +endmodule diff --git a/ivtest/regress-vlg.list b/ivtest/regress-vlg.list index 5306833bc..de57a69b8 100644 --- a/ivtest/regress-vlg.list +++ b/ivtest/regress-vlg.list @@ -1610,6 +1610,7 @@ task_noop normal ivltests # Task with no contents. task_noop2 CO ivltests # Task *really* with no contents. task_omemw2 normal ivltests task_omemw3 CO ivltests # Pass bit selected from vector to task +task_port_range_mismatch CE ivltests task_port_size normal ivltests # truncate task port connections task_scope normal ivltests tern1 normal ivltests # Finds problems with ?: using different sizes