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