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