verilator/test_regress/t/t_increment_bad.v
Krzysztof Bieganski ba052beccd
Make reference to increment temporary an rvalue (#3659)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2022-10-10 13:58:05 +02:00

28 lines
430 B
Systemverilog

module t (/*AUTOARG*/
// Inputs
clk
);
input clk;
int pos;
int a;
int b;
int array[2][2] = '{ '{0, 1}, '{2, 3}};
string test_string = "abcd";
initial begin
if (0 && test_string[pos++] != "e");
if (1 || pos-- != 1);
if (a <-> --b);
if (0 -> ++b);
pos = (a > 0) ? a++ : --b;
pos = array[0][0]++;
end
assert property (@(posedge clk) a++ >= 0);
endmodule