diff options
Diffstat (limited to 'src/theory/bv')
-rw-r--r-- | src/theory/bv/theory_bv_type_rules.h | 4 |
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)); } |