Skip to content

Commit 9f064df

Browse files
committed
langref: runtime_shrExact_overflow does not work as expected on RISC-V
#24304
1 parent b739fec commit 9f064df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
const builtin = @import("builtin");
12
const std = @import("std");
23

34
pub fn main() void {
45
var x: u8 = 0b10101010; // runtime-known
56
_ = &x;
67
const y = @shrExact(x, 2);
78
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");
811
}
912

1013
// exe=fail

0 commit comments

Comments
 (0)