zig
zig copied to clipboard
stage2: `@shlExact` and `@shrExact` crashes the compiler when the first argument is a comptime_int and the second is runtime known
Zig Version
0.10.0-dev.3361+c650ccfca
Steps to Reproduce
Run the following with zig test -fno-stage1 shl.zig
test {
var x: u5 = 1;
_ = @shlExact(12345, x);
_ = @shrExact(12345, x);
}
Expected Behavior
Compiles without error.
Actual Behavior
> zig test -fno-stage1 shl.zig
fish: Job 1, 'zig test -fno-stage1 shl.zig' terminated by signal SIGTRAP (Trace or breakpoint trap)