From 528a73a492b2a9bd11c978d5f638375531068a02 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 10 Nov 2022 22:09:24 -0500 Subject: [PATCH] Fix instability after disable iff error. --- src/V3AssertPre.cpp | 1 + test_regress/t/t_assert_disable_bad.out | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/V3AssertPre.cpp b/src/V3AssertPre.cpp index 528efcd96..0cd4a9a00 100644 --- a/src/V3AssertPre.cpp +++ b/src/V3AssertPre.cpp @@ -109,6 +109,7 @@ private: if (nodep->disablep() && propExprp->disablep()) { nodep->v3error("disable iff expression before property call and in its " "body is not legal"); + pushDeletep(propExprp->disablep()->unlinkFrBack()); } // If disable iff is in outer property, move it to inner if (nodep->disablep()) { diff --git a/test_regress/t/t_assert_disable_bad.out b/test_regress/t/t_assert_disable_bad.out index 820b9b72d..a53fbe9d1 100644 --- a/test_regress/t/t_assert_disable_bad.out +++ b/test_regress/t/t_assert_disable_bad.out @@ -2,6 +2,4 @@ : ... In instance t 27 | assert property (disable iff (val == 0) check(1, 1)); | ^~ -%Error: Internal Error: t/t_assert_disable_bad.v:21:7: ../V3Ast.cpp:#: Adding to non-empty, non-list op2 - 21 | @(posedge clk) - | ^ +%Error: Exiting due to