Files
c3c/test/test_suite/union/union_codegen_const.c3t
Christoffer Lerno 460c0d04d7 Generic modules.
2021-05-12 17:25:59 +02:00

21 lines
484 B
Plaintext

module test;
union Foo
{
int a;
double b;
}
Foo f = { .a = 23 };
Foo g = { .b = 2.3 };
Foo h = { .a = 23, .b = 2.3 };
Foo i = { .b = 2.3, .a = 23 };
// #expect: test.ll
@test.f = protected global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8
@test.g = protected global %test.Foo { double 2.300000e+00 }, align 8
@test.h = protected global %test.Foo { double 2.300000e+00 }, align 8
@test.i = protected global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8