mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-28 16:53:45 +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]>
18 lines
304 B
Verilog
18 lines
304 B
Verilog
// Check that it is possible to copy an empty queue to an dynamic array.
|
|
|
|
module test;
|
|
|
|
initial begin
|
|
int d[];
|
|
int q[$];
|
|
d = '{1, 2, 3};
|
|
d = q;
|
|
if (d.size() == 0 && q.size() == 0) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
end
|
|
|
|
endmodule
|