zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

runtime_shrExact_overflow.zig (363B) - Raw


      1 const builtin = @import("builtin");
      2 const std = @import("std");
      3 
      4 pub fn main() void {
      5     var x: u8 = 0b10101010; // runtime-known
      6     _ = &x;
      7     const y = @shrExact(x, 2);
      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");
     11 }
     12 
     13 // exe=fail