mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
41 lines
612 B
Plaintext
41 lines
612 B
Plaintext
// #target: windows-x64
|
|
module test;
|
|
|
|
macro int create_int2() {
|
|
$$unreachable();
|
|
}
|
|
|
|
fn void test()
|
|
{
|
|
int x = create_int2();
|
|
}
|
|
macro int? create_int()
|
|
{
|
|
$$unreachable();
|
|
}
|
|
|
|
fn int main()
|
|
{
|
|
int? x = create_int();
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test.test() #0 {
|
|
entry:
|
|
%x = alloca i32, align 4
|
|
%blockret = alloca i32, align 4
|
|
unreachable
|
|
|
|
after_macro: ; No predecessors!
|
|
store i32 poison, ptr %x, align 4
|
|
ret void
|
|
}
|
|
|
|
define i32 @test.main() #0 {
|
|
entry:
|
|
%x = alloca i32, align 4
|
|
%x.f = alloca i64, align 8
|
|
%blockret = alloca i32, align 4
|
|
unreachable
|
|
} |