aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-26 18:56:31 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:55 -0700
commit1dc01f11401b6ec0be1e7685cdc445d1b10d4f19 (patch)
treea64c1aa2d0f7f136325971e01ac1ec4ddd79ef13 /src/value.zig
parent9cd0ca9f482ef7f76d3f3ca683913e9aceaa47fe (diff)
downloadzig-1dc01f11401b6ec0be1e7685cdc445d1b10d4f19.tar.gz
zig-1dc01f11401b6ec0be1e7685cdc445d1b10d4f19.zip
InternPool: fix build-exe and compiler-rt crashes
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.zig b/src/value.zig
index 473b1c967c..23b90f40df 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -3166,6 +3166,11 @@ pub const Value = struct {
.len = undefined,
};
result_bigint.shiftLeft(lhs_bigint, shift);
+ if (ty.toIntern() != .comptime_int_type) {
+ const int_info = ty.intInfo(mod);
+ result_bigint.truncate(result_bigint.toConst(), int_info.signedness, int_info.bits);
+ }
+
return mod.intValue_big(ty, result_bigint.toConst());
}