mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
30 lines
422 B
Plaintext
30 lines
422 B
Plaintext
// #target: macos-x64
|
|
module foo;
|
|
|
|
struct Bar
|
|
{
|
|
struct
|
|
{
|
|
int y;
|
|
}
|
|
int ufe;
|
|
int[*] z;
|
|
}
|
|
|
|
|
|
fn void test(Bar b)
|
|
{
|
|
b.z[1];
|
|
}
|
|
|
|
/* #expect: foo.ll
|
|
|
|
%Bar = type { %.anon, i32, [0 x i32] }
|
|
%.anon = type { i32 }
|
|
|
|
define void @foo.test(ptr byval(%Bar) align 8 %0) #0 {
|
|
entry:
|
|
%ptradd = getelementptr inbounds i8, ptr %0, i64 8
|
|
%ptradd1 = getelementptr inbounds i8, ptr %ptradd, i64 4
|
|
ret void
|
|
} |