mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 22:33:08 +00:00
14 lines
429 B
Zig
14 lines
429 B
Zig
const builtin = @import("builtin");
|
|
const std = @import("std");
|
|
|
|
pub fn main() void {
|
|
var x: u8 = 0b10101010; // runtime-known
|
|
_ = &x;
|
|
const y = @shrExact(x, 2);
|
|
std.debug.print("value: {}\n", .{y});
|
|
|
|
if ((builtin.cpu.arch.isRISCV() or builtin.cpu.arch.isLoongArch() or builtin.cpu.arch == .s390x) and builtin.zig_backend == .stage2_llvm) @panic("https://github.com/ziglang/zig/issues/24304");
|
|
}
|
|
|
|
// exe=fail
|