mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
24 lines
265 B
Plaintext
24 lines
265 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
import std;
|
|
macro foo(...)
|
|
{
|
|
$vaexpr[0] = 2;
|
|
}
|
|
|
|
fn void main()
|
|
{
|
|
int $x;
|
|
foo($x);
|
|
int y = $x;
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test.main() #0 {
|
|
entry:
|
|
%y = alloca i32, align 4
|
|
store i32 2, ptr %y, align 4
|
|
ret void
|
|
}
|