Fix removing if statement with side effect in condition (#3131).

This commit is contained in:
Wilson Snyder
2021-09-13 15:52:53 -04:00
parent 81fd3e4732
commit 08c8b0d7d6
4 changed files with 23 additions and 4 deletions
+5
View File
@@ -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