verilator/test_regress/t/t_func_refio_bad.v

19 lines
401 B
Systemverilog
Raw Normal View History

2020-11-28 19:46:14 +01:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2020 Wilson Snyder
2020-11-28 19:46:14 +01:00
// SPDX-License-Identifier: CC0-1.0
2026-03-03 13:21:24 +01:00
module t;
2026-03-08 23:26:40 +01:00
typedef integer q_t[$];
2020-11-28 19:46:14 +01:00
2026-03-08 23:26:40 +01:00
function void queue_set(ref q_t q);
q.push_back(42);
endfunction
2020-11-28 19:46:14 +01:00
2026-03-08 23:26:40 +01:00
initial begin
q_t iq;
queue_set(42); // 42 is bad, meant iq
end
2020-11-28 19:46:14 +01:00
endmodule