Files
c3c/test/test_suite/bitstruct/bitstruct_cast_const_init.c3t
2023-03-02 19:47:24 +01:00

20 lines
309 B
C

// #target: macos-x64
module test;
bitstruct Foo : int
{
int abc : 0..4;
int def : 23..26;
}
fn void main()
{
Foo f;
int z = (int) Foo { .abc = 2, .def = 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