mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-24 22:17:08 +00:00
Fixes #75978. Fixes #99960. Fixes #101048. Fixes #101082. Fixes #101814. Fixes #103132. Fixes #103327.
17 lines
285 B
Rust
17 lines
285 B
Rust
// compile-flags: -O
|
|
// min-llvm-version: 16
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#[no_mangle]
|
|
pub fn test() -> usize {
|
|
// CHECK-LABEL: @test(
|
|
// CHECK: ret i64 165
|
|
let values = [23, 16, 54, 3, 60, 9];
|
|
let mut acc = 0;
|
|
for item in values {
|
|
acc += item;
|
|
}
|
|
acc
|
|
}
|