Skip to content

Commit 882f64c

Browse files
committed
add codegen test for #93036
1 parent 44dce08 commit 882f64c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@ compile-flags: -O
2+
//@ min-llvm-version: 17
3+
4+
#![crate_type = "lib"]
5+
6+
#[no_mangle]
7+
// CHECK-LABEL: @foo
8+
// CHECK: {{.*}}:
9+
// CHECK: ret
10+
// CHECK-NOT: unreachable
11+
pub fn foo(arr: &mut [u32]) {
12+
for i in 0..arr.len() {
13+
for j in 0..i {
14+
assert!(j < arr.len());
15+
}
16+
}
17+
}
18+

0 commit comments

Comments
 (0)