From fbf2e59c85eac65cbd4460898dd878e5c20f2cec Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 10 Nov 2022 20:49:11 -0500 Subject: [PATCH] Fix loss of V3Simulate on expression statements. --- src/V3Simulate.h | 6 ++++++ test_regress/t/t_assert_disable_bad.out | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/V3Simulate.h b/src/V3Simulate.h index 7c70e4ba1..02c8344d0 100644 --- a/src/V3Simulate.h +++ b/src/V3Simulate.h @@ -863,6 +863,12 @@ private: void visit(AstComment*) override {} + void visit(AstStmtExpr* nodep) override { + if (jumpingOver(nodep)) return; + checkNodeInfo(nodep); + iterateChildren(nodep); + } + void visit(AstJumpBlock* nodep) override { if (jumpingOver(nodep)) return; iterateChildren(nodep); diff --git a/test_regress/t/t_assert_disable_bad.out b/test_regress/t/t_assert_disable_bad.out index a53fbe9d1..820b9b72d 100644 --- a/test_regress/t/t_assert_disable_bad.out +++ b/test_regress/t/t_assert_disable_bad.out @@ -2,4 +2,6 @@ : ... In instance t 27 | assert property (disable iff (val == 0) check(1, 1)); | ^~ -%Error: Exiting due to +%Error: Internal Error: t/t_assert_disable_bad.v:21:7: ../V3Ast.cpp:#: Adding to non-empty, non-list op2 + 21 | @(posedge clk) + | ^