mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
24 lines
555 B
Plaintext
24 lines
555 B
Plaintext
// #target: windows-x64
|
|
module test;
|
|
int[<2>] foo @align(1);
|
|
|
|
fn void main()
|
|
{
|
|
foo[1] = 2;
|
|
foo.y = 4;
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
@test.foo = local_unnamed_addr global <2 x i32> zeroinitializer, align 1
|
|
|
|
define void @test.main() #0 {
|
|
entry:
|
|
%0 = load <2 x i32>, ptr @test.foo, align 1
|
|
%elemset = insertelement <2 x i32> %0, i32 2, i64 1
|
|
store <2 x i32> %elemset, ptr @test.foo, align 1
|
|
%1 = load <2 x i32>, ptr @test.foo, align 1
|
|
%elemset1 = insertelement <2 x i32> %1, i32 4, i64 1
|
|
store <2 x i32> %elemset1, ptr @test.foo, align 1
|
|
ret void
|
|
} |