mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
5e9fe84d24
Closes #7525
22 lines
331 B
Zig
22 lines
331 B
Zig
const std = @import("std");
|
|
|
|
noinline fn outer() u32 {
|
|
var a: u32 = 42;
|
|
return inner(.{
|
|
.unused = a,
|
|
.value = [1]u32{0},
|
|
});
|
|
}
|
|
|
|
noinline fn inner(args: anytype) u32 {
|
|
return args.value[0];
|
|
}
|
|
|
|
pub fn main() !void {
|
|
try std.testing.expect(outer() == 0);
|
|
}
|
|
|
|
// run
|
|
// backend=llvm
|
|
// target=native
|