2018-08-06 11:45:15 -05:00
|
|
|
// ignore-debug: the debug assertions get in the way
|
2017-07-27 16:53:44 -05:00
|
|
|
// no-system-llvm
|
|
|
|
// compile-flags: -O
|
2022-09-10 06:33:44 -05:00
|
|
|
#![crate_type = "lib"]
|
2017-07-27 16:53:44 -05:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn sum_me() -> i32 {
|
|
|
|
// CHECK-LABEL: @sum_me
|
|
|
|
// CHECK-NEXT: {{^.*:$}}
|
2022-09-10 06:33:44 -05:00
|
|
|
// CHECK-NEXT: {{.*}} load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1
|
2017-07-27 16:53:44 -05:00
|
|
|
// CHECK-NEXT: ret i32 6
|
|
|
|
vec![1, 2, 3].iter().sum::<i32>()
|
|
|
|
}
|