Files
c3c/test/test_suite/struct/struct_codegen_fam.c3t
Christoffer Lerno 25bccf4883 New faults and syntax (#2034)
- Remove `[?]` syntax.
- Change `int!` to `int?` syntax.
- New `fault` declarations.
- Enum associated values can reference the calling enum.
2025-03-10 00:11:35 +01:00

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
}