aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-03-24 13:13:25 +0000
committergingerBill <bill@gingerbill.org>2025-03-24 13:13:25 +0000
commitce026ff2c4ef1b29d3876f1ab5c866eda7995679 (patch)
treec4883822cebcc1f0cc5bb904a60e1ad6cef99e82 /src
parent56e0ab7655337b8ce9738d214c21e5f06e91df09 (diff)
Fix #4949
Diffstat (limited to 'src')
-rw-r--r--src/check_builtin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index a49302a69..fa3218759 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -645,6 +645,13 @@ gb_internal bool check_builtin_simd_operation(CheckerContext *c, Operand *operan
break;
}
+ if (!are_types_identical(x.type, y.type)) {
+ gbString tx = type_to_string(x.type);
+ gbString ty = type_to_string(y.type);
+ error(call, "Mismatched types to '%.*s', '%s' vs '%s'", LIT(builtin_name), tx, ty);
+ gb_string_free(ty);
+ gb_string_free(tx);
+ }
Type *vt = base_type(x.type);
GB_ASSERT(vt->kind == Type_SimdVector);