Files
c3c/test/test_suite7/bitstruct/bitstruct_cast_const_init.c3t
2025-02-23 13:53:04 +01:00

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