Support assert property statement-else-statement

This commit is contained in:
Wilson Snyder
2023-03-10 22:13:17 -05:00
parent 81e8388c3f
commit 60a6ed2a20
3 changed files with 40 additions and 13 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ private:
const bool force = VN_IS(nodep, AssertIntrinsic);
if (passsp) passsp = newIfAssertOn(passsp, force);
if (failsp) failsp = newIfAssertOn(failsp, force);
if (!failsp) failsp = newFireAssertUnchecked(nodep, "'assert' failed.");
if (!passsp && !failsp) failsp = newFireAssertUnchecked(nodep, "'assert' failed.");
ifp = new AstIf{nodep->fileline(), propp, passsp, failsp};
ifp->isBoundsCheck(true); // To avoid LATCH warning
// It's more LIKELY that we'll take the nullptr if clause