summaryrefslogtreecommitdiffstats
path: root/tests/codegen/non-terminate/infinite-recursion.rs
blob: 6d1f2d4bf8f4ad5ab60c8de9a56ffb6028e11a93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// compile-flags: -C opt-level=3

#![crate_type = "lib"]

#![allow(unconditional_recursion)]

// CHECK-LABEL: @infinite_recursion
#[no_mangle]
fn infinite_recursion() -> u8 {
    // CHECK-NOT: ret i8 undef
    // CHECK: br label %{{.+}}
    // CHECK-NOT: ret i8 undef
    infinite_recursion()
}