master
1const std = @import("std");
2pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
3 _ = stack_trace;
4 if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
5 std.process.exit(0);
6 }
7 std.process.exit(1);
8}
9var x: f32 = 256;
10pub fn main() !void {
11 _ = @as(u8, @intFromFloat(x));
12 return error.TestFailed;
13}
14// run
15// backend=selfhosted,llvm
16// target=x86_64-linux