From 0acb938f7965fa92cce30aa12020dab9301a742a Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Sun, 11 Dec 2022 16:40:30 -0800 Subject: [PATCH] Regression test that optional for_step works Add the br_gh801b.v regression test. --- ivtest/ivltests/br_gh801b.v | 21 +++++++++++++++++++++ ivtest/regress-sv.list | 1 + 2 files changed, 22 insertions(+) create mode 100644 ivtest/ivltests/br_gh801b.v diff --git a/ivtest/ivltests/br_gh801b.v b/ivtest/ivltests/br_gh801b.v new file mode 100644 index 000000000..0de2f2018 --- /dev/null +++ b/ivtest/ivltests/br_gh801b.v @@ -0,0 +1,21 @@ + +module main; + initial begin + int idx; + for (idx = 1 ; idx < 5 ; ) begin + $display("... %02d", idx); + idx += 1; + end + if (idx !== 5) begin + $display("FAILED -- idx=%0d", idx); + $finish; + end + idx = 2; + for ( ; idx < 5 ; ) begin + $display("... %02d", idx); + idx += 1; + end + $display("PASSED"); + $finish; + end +endmodule // main diff --git a/ivtest/regress-sv.list b/ivtest/regress-sv.list index bef38ab40..93f3a3d03 100644 --- a/ivtest/regress-sv.list +++ b/ivtest/regress-sv.list @@ -222,6 +222,7 @@ br_gh699 CE,-g2009 ivltests br_gh756 normal,-g2009 ivltests br_gh782a normal,-g2009 ivltests gold=br_gh782a.gold br_gh801 normal,-g2009 ivltests +br_gh801b normal,-g2009 ivltests br_ml20171017 normal,-g2009 ivltests br_ml20180227 CE,-g2009 ivltests br_ml20180309a normal,-g2009 ivltests