summaryrefslogtreecommitdiff
path: root/src/theory/bv
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/bv')
-rw-r--r--src/theory/bv/theory_bv_type_rules.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h
index 97b7a8a8f..42b90cd29 100644
--- a/src/theory/bv/theory_bv_type_rules.h
+++ b/src/theory/bv/theory_bv_type_rules.h
@@ -339,6 +339,10 @@ class IntToBitVectorOpTypeRule
if (n.getKind() == kind::INT_TO_BITVECTOR_OP)
{
size_t bvSize = n.getConst<IntToBitVector>();
+ if (bvSize == 0)
+ {
+ throw TypeCheckingExceptionPrivate(n, "expecting bit-width > 0");
+ }
return nodeManager->mkFunctionType(nodeManager->integerType(),
nodeManager->mkBitVectorType(bvSize));
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback