mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
40 lines
587 B
Plaintext
40 lines
587 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
int x;
|
|
fn void test1()
|
|
{
|
|
while (true) {
|
|
testx();
|
|
}
|
|
}
|
|
fn void test2()
|
|
{
|
|
do {
|
|
testx();
|
|
} while (true);
|
|
}
|
|
fn void testx() {}
|
|
|
|
fn void main()
|
|
{}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test.test1() #0 {
|
|
entry:
|
|
br label %loop.body
|
|
|
|
loop.body: ; preds = %loop.body, %entry
|
|
call void @test.testx()
|
|
br label %loop.body
|
|
}
|
|
|
|
define void @test.test2() #0 {
|
|
entry:
|
|
br label %loop.body
|
|
|
|
loop.body: ; preds = %loop.body, %entry
|
|
call void @test.testx()
|
|
br label %loop.body
|
|
|
|
} |