mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
4dba253cd2
There is nothing inherently LLVM-specific about any of these.
14 lines
252 B
Zig
14 lines
252 B
Zig
const A = struct { a: ?[1]i32 };
|
|
fn entry(a: *addrspace(.gs) [1]A) *addrspace(.gs) i32 {
|
|
return &a[0].a.?[0];
|
|
}
|
|
pub fn main() void {
|
|
_ = &entry;
|
|
}
|
|
|
|
// compile
|
|
// output_mode=Exe
|
|
// backend=selfhosted,llvm
|
|
// target=x86_64-linux,x86_64-macos
|
|
//
|