Files
c3c/test/test_suite/import/access_other_module.c3t
2024-10-12 02:13:35 +02:00

23 lines
436 B
Plaintext

// #target: macos-x64
module foo;
import libc;
fn void main()
{
void* foekf = &libc::printf;
int* xok = &libc::EXIT_SUCCESS;
}
/* #expect: foo.ll
@libc.EXIT_SUCCESS = extern_weak constant i32, align 4
define void @foo.main() #0 {
entry:
%foekf = alloca ptr, align 8
%xok = alloca ptr, align 8
store ptr @printf, ptr %foekf, align 8
store ptr @libc.EXIT_SUCCESS, ptr %xok, align 8
ret void
}
declare i32 @printf(ptr, ...)