mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
28 lines
415 B
Plaintext
28 lines
415 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
bitstruct Foo : char
|
|
{
|
|
bool baz;
|
|
}
|
|
|
|
fn int main()
|
|
{
|
|
char ch = 0;
|
|
Foo foo1 = (Foo)ch;
|
|
Foo foo2 = (Foo)0;
|
|
return 0;
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
entry:
|
|
%ch = alloca i8, align 1
|
|
%foo1 = alloca i8, align 1
|
|
%foo2 = alloca i8, align 1
|
|
store i8 0, ptr %ch, align 1
|
|
%0 = load i8, ptr %ch, align 1
|
|
store i8 %0, ptr %foo1, align 1
|
|
store i8 0, ptr %foo2, align 1
|
|
ret i32 0
|
|
}
|