diff --git a/releasenotes.md b/releasenotes.md index 12b5b7e9e..3d61f89b3 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -36,6 +36,7 @@ - Fix bug when creating bool vectors in certain cases. - Compiler assert when passing returning CT failure immediately rethrown #2689. - Converting between simd/non-simd bool vector would hit a compiler assert. #2691 +- `i` suffixes were not caught when n < 8, causing an assert. ### Stdlib changes - Add `ThreadPool` join function to wait for all threads to finish in the pool without destroying the threads. diff --git a/src/compiler/parse_expr.c b/src/compiler/parse_expr.c index 5b57e1925..b38382468 100644 --- a/src/compiler/parse_expr.c +++ b/src/compiler/parse_expr.c @@ -1667,7 +1667,7 @@ EXIT: Type *type_base = NULL; if (type_bits) { - if (type_bits < 0 || !is_power_of_two((uint64_t)type_bits) || type_bits > 128) + if (type_bits < 8 || !is_power_of_two((uint64_t)type_bits) || type_bits > 128) { PRINT_ERROR_AT(expr_int, "Integer type suffix should be i8, i16, i32, i64 or i128."); return poisoned_expr;