mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Check that it is possible to copy empty dynamic arrays and queues. If the target is a dynamic arrays there are two ways of copying. Through direct assignment as well as the array new operator. Signed-off-by: Lars-Peter Clausen <[email protected]>
19 lines
346 B
Verilog
19 lines
346 B
Verilog
// Check that it is possible to copy an empty dynamic array using a dynamic
|
|
// array new operation.
|
|
|
|
module test;
|
|
|
|
initial begin
|
|
int d1[];
|
|
int d2[];
|
|
d1 = '{1, 2, 3};
|
|
d1 = new [2](d2);
|
|
if (d1.size() == 2 && d2.size() == 0) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
end
|
|
|
|
endmodule
|