mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
20 lines
313 B
Plaintext
20 lines
313 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
bitstruct Foo : int
|
|
{
|
|
int abc : 0..4;
|
|
int defg : 23..26;
|
|
}
|
|
|
|
fn void main()
|
|
{
|
|
Foo f;
|
|
int z = (int) (Foo) { .abc = 2, .defg = 1 };
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
%f = alloca i32, align 4
|
|
%z = alloca i32, align 4
|
|
store i32 0, ptr %f, align 4
|
|
store i32 8388610, ptr %z, align 4 |