mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Bug with slice acces as inline struct member #2088.
This commit is contained in:
22
test/test_suite/struct/inline_slice_access_2088.c3t
Normal file
22
test/test_suite/struct/inline_slice_access_2088.c3t
Normal file
@@ -0,0 +1,22 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
|
||||
struct Foo
|
||||
{
|
||||
inline String str;
|
||||
}
|
||||
|
||||
fn int main()
|
||||
{
|
||||
(Foo){}.len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
entry:
|
||||
%literal = alloca %Foo, align 8
|
||||
call void @llvm.memset.p0.i64(ptr align 8 %literal, i8 0, i64 16, i1 false)
|
||||
%ptradd = getelementptr inbounds i8, ptr %literal, i64 8
|
||||
ret i32 0
|
||||
}
|
||||
Reference in New Issue
Block a user