Skip to content

Commit 1c327e1

Browse files
committed
Add test.
1 parent b22c152 commit 1c327e1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/mir-opt/inline/issue_106141.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pub fn outer() -> usize {
2+
inner()
3+
}
4+
5+
fn index() -> usize {
6+
loop {}
7+
}
8+
9+
#[inline]
10+
fn inner() -> usize {
11+
let buffer = &[true];
12+
let index = index();
13+
if buffer[index] {
14+
index
15+
} else {
16+
0
17+
}
18+
}
19+
20+
fn main() {
21+
outer();
22+
}

0 commit comments

Comments
 (0)