Add test.
This commit is contained in:
parent
b22c152958
commit
1c327e1133
22
tests/mir-opt/inline/issue_106141.rs
Normal file
22
tests/mir-opt/inline/issue_106141.rs
Normal file
@ -0,0 +1,22 @@
|
||||
pub fn outer() -> usize {
|
||||
inner()
|
||||
}
|
||||
|
||||
fn index() -> usize {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn inner() -> usize {
|
||||
let buffer = &[true];
|
||||
let index = index();
|
||||
if buffer[index] {
|
||||
index
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
outer();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user