2023-09-21 22:42:21 -05:00
|
|
|
// Guards against regression for optimization discussed in issue #80836
|
|
|
|
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -O
|
2023-09-21 22:42:21 -05:00
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
use std::collections::VecDeque;
|
|
|
|
|
|
|
|
// CHECK-LABEL: @front
|
|
|
|
// CHECK: ret void
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn front(v: VecDeque<usize>) {
|
|
|
|
if !v.is_empty() {
|
|
|
|
v.get(0).unwrap();
|
|
|
|
}
|
|
|
|
}
|