]> git.lizzy.rs Git - rust.git/blob - tests/codegen/non-terminate/infinite-loop-1.rs
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
[rust.git] / tests / codegen / non-terminate / infinite-loop-1.rs
1 // compile-flags: -C opt-level=3
2
3 #![crate_type = "lib"]
4
5 fn infinite_loop() -> u8 {
6     loop {}
7 }
8
9 // CHECK-LABEL: @test
10 #[no_mangle]
11 fn test() -> u8 {
12     // CHECK-NOT: unreachable
13     // CHECK: br label %{{.+}}
14     // CHECK-NOT: unreachable
15     let x = infinite_loop();
16     x
17 }