Merge pull request #7372 from kalsprite/abs_constant_range

check_builtin: range-check the constant `abs` folds
This commit is contained in:
gingerBill
2026-08-18 12:05:28 +02:00
committed by GitHub
2 changed files with 40 additions and 1 deletions

View File

@@ -4612,6 +4612,11 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As
}
GB_ASSERT(!is_type_complex_or_quaternion(operand->type));
if (operand->mode == Addressing_Constant) {
operand->expr = call;
check_is_expressible(c, operand, operand->type);
}
break;
}