mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
28 lines
692 B
C
28 lines
692 B
C
// #target: macos-x64
|
|
module test;
|
|
|
|
extern fn void test1_f(void *);
|
|
|
|
fn void test1_g()
|
|
{
|
|
float[4] x;
|
|
test1_f(&x);
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test_test1_g() #0 {
|
|
entry:
|
|
%x = alloca [4 x float], align 16
|
|
%0 = getelementptr inbounds [4 x float], ptr %x, i64 0, i64 0
|
|
store float 0.000000e+00, ptr %0, align 4
|
|
%1 = getelementptr inbounds [4 x float], ptr %x, i64 0, i64 1
|
|
store float 0.000000e+00, ptr %1, align 4
|
|
%2 = getelementptr inbounds [4 x float], ptr %x, i64 0, i64 2
|
|
store float 0.000000e+00, ptr %2, align 4
|
|
%3 = getelementptr inbounds [4 x float], ptr %x, i64 0, i64 3
|
|
store float 0.000000e+00, ptr %3, align 4
|
|
call void @test1_f(ptr %x)
|
|
ret void
|
|
}
|