Fix wildcard equality and inside operators for non-fourstate expressions (#5673)

This commit is contained in:
Ryszard Rozak
2024-12-12 14:51:48 +01:00
committed by GitHub
parent a2f327f729
commit 03e8ef0b0f
9 changed files with 124 additions and 6 deletions
+5 -3
View File
@@ -237,9 +237,11 @@ class UnknownVisitor final : public VNVisitor {
AstNodeExpr* const rhsp = nodep->rhsp()->unlinkFrBack();
AstNodeExpr* newp;
if (!VN_IS(rhsp, Const)) {
nodep->v3warn(E_UNSUPPORTED, "Unsupported: RHS of ==? or !=? must be "
"constant to be synthesizable"); // Says spec.
// Replace with anything that won't cause more errors
if (rhsp->dtypep()->isFourstate()) {
nodep->v3warn(
E_UNSUPPORTED,
"Unsupported: RHS of ==? or !=? is fourstate but not a constant");
}
newp = new AstEq{nodep->fileline(), lhsp, rhsp};
} else {
// X or Z's become mask, ala case statements.