Files
c3c/test/test_suite/statements/infinite_do_while.c3t

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
}