authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-06-30 10:55:28+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-07-01 23:03:15+02:00
log9f064dff477a100b95438c7842253dfb20224553
tree998cab6f10265c35f313bc1d534275f18441c614
parentb739fec841ced5a6b41f36847945f638254b33bb
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

langref: runtime_shrExact_overflow does not work as expected on RISC-V

https://github.com/ziglang/zig/issues/24304

1 files changed, 3 insertions(+), 0 deletions(-)

doc/langref/runtime_shrExact_overflow.zig+3
...@@ -1,3 +1,4 @@...@@ -1,3 +1,4 @@
1const builtin = @import("builtin");
1const std = @import("std");2const std = @import("std");
23
3pub fn main() void {4pub fn main() void {
...@@ -5,6 +6,8 @@ pub fn main() void {...@@ -5,6 +6,8 @@ pub fn main() void {
5 _ = &x;6 _ = &x;
6 const y = @shrExact(x, 2);7 const y = @shrExact(x, 2);
7 std.debug.print("value: {}\n", .{y});8 std.debug.print("value: {}\n", .{y});
9
10 if (builtin.cpu.arch.isRISCV() and builtin.zig_backend == .stage2_llvm) @panic("https://github.com/ziglang/zig/issues/24304");
8}11}
912
10// exe=fail13// exe=fail