mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
25 lines
449 B
Plaintext
25 lines
449 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
import std;
|
|
fn void main()
|
|
{
|
|
Volatile{int} y;
|
|
y.set(20);
|
|
y.get();
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test.main() #0 {
|
|
entry:
|
|
%y = alloca i32, align 4
|
|
store i32 0, ptr %y, align 4
|
|
%neq = icmp ne ptr %y, null
|
|
call void @llvm.assume(i1 %neq)
|
|
store volatile i32 20, ptr %y, align 4
|
|
%neq1 = icmp ne ptr %y, null
|
|
call void @llvm.assume(i1 %neq1)
|
|
%0 = load volatile i32, ptr %y, align 4
|
|
ret void
|
|
}
|