mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix removing if statement with side effect in condition (#3131).
This commit is contained in:
@@ -103,6 +103,11 @@ module t;
|
||||
$display("i='%d'",p_i);
|
||||
if (p_i !== 32'd1234) $stop;
|
||||
|
||||
// bug3131 - really "if" side effect test
|
||||
p_i = 0;
|
||||
if ($value$plusargs("INT=%d", p_i)) ;
|
||||
if (p_i !== 32'd1234) $stop;
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user