mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
28 lines
787 B
C
28 lines
787 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], [4 x float]* %x, i64 0, i64 0
|
|
store float 0.000000e+00, float* %0, align 4
|
|
%1 = getelementptr inbounds [4 x float], [4 x float]* %x, i64 0, i64 1
|
|
store float 0.000000e+00, float* %1, align 4
|
|
%2 = getelementptr inbounds [4 x float], [4 x float]* %x, i64 0, i64 2
|
|
store float 0.000000e+00, float* %2, align 4
|
|
%3 = getelementptr inbounds [4 x float], [4 x float]* %x, i64 0, i64 3
|
|
store float 0.000000e+00, float* %3, align 4
|
|
%ptrptr = bitcast [4 x float]* %x to i8*
|
|
call void @test1_f(i8* %ptrptr)
|
|
ret void
|
|
}
|