about summary refs log tree commit diff
path: root/tests/codegen/issues/issue-93036-assert-index.rs
blob: 7a2ea087266880b4688772490cf56994aeb32ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ compile-flags: -O

#![crate_type = "lib"]

#[no_mangle]
// CHECK-LABEL: @foo
// CHECK-NOT: unreachable
pub fn foo(arr: &mut [u32]) {
    for i in 0..arr.len() {
        for j in 0..i {
            assert!(j < arr.len());
        }
    }
}