zig/test/behavior/bugs/7187.zig
Jakub Konka 8d5acf7693 test: recursively walk dir with tests
Prune incremental tests by moving non-incremental behavior tests to
behavior test suite instead.
2022-04-28 18:35:01 +02:00

19 lines
423 B
Zig

const std = @import("std");
const builtin = @import("builtin");
const expect = std.testing.expect;
test "miscompilation with bool return type" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
var x: usize = 1;
var y: bool = getFalse();
_ = y;
try expect(x == 1);
}
fn getFalse() bool {
return false;
}