mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Upgrade of mingw in CI. Fix problems using reflection on interface types #1203. Improved debug information on defer. $foreach doesn't create an implicit syntactic scope. Error if `@if` depends on `@if`. Updated Linux stacktrace. Fix of default argument stacktrace. Allow linking libraries directly by file path. Improve inlining warning messages. Added `index_of_char_from`. Compiler crash using enum nameof from different module #1205. Removed unused fields in find_msvc. Use vswhere to find msvc. Update tests for LLVM 19
22 lines
480 B
Plaintext
22 lines
480 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
|
|
store i32 4, ptr getelementptr inbounds (i8, ptr @test.foo, i64 4), align 1
|
|
ret void
|
|
} |