Files
c3c/test/test_suite/statements/infinite_do_while.c3t
2022-08-10 16:37:27 +02:00

46 lines
749 B
C

// #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
loop.exit: ; No predecessors!
ret void
}
define void @test_test2() #0 {
entry:
br label %loop.body
loop.body: ; preds = %loop.body, %entry
call void @test_testx()
br label %loop.body
loop.exit: ; No predecessors!
ret void
}