Files
c3c/test/test_suite/bitstruct/bitstruct_in_subarray.c3t
2024-09-13 15:11:15 +02:00

25 lines
505 B
Plaintext

// #target: macos-x64
module test;
bitstruct StructFieldKind : char
{
bool is_inline : 0;
bool is_union : 1;
}
fn void! main()
{
StructFieldKind[] xx = { { .is_union = true } };
}
/* #expect: test.ll
define i64 @test.main() #0 {
entry:
%xx = alloca %"char[]", align 8
%literal = alloca [1 x i8], align 1
store i8 2, ptr %literal, align 1
%0 = insertvalue %"char[]" undef, ptr %literal, 0
%1 = insertvalue %"char[]" %0, i64 1, 1
store %"char[]" %1, ptr %xx, align 8
ret i64 0
}