]> git.proxmox.com Git - rustc.git/blob - tests/codegen/issues/issue-45466.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / tests / codegen / issues / issue-45466.rs
1 // compile-flags: -O
2 // ignore-debug: the debug assertions get in the way
3
4 #![crate_type="rlib"]
5
6 // CHECK-LABEL: @memzero
7 // CHECK-NOT: store
8 // CHECK: call void @llvm.memset
9 // CHECK-NOT: store
10 #[no_mangle]
11 pub fn memzero(data: &mut [u8]) {
12 for i in 0..data.len() {
13 data[i] = 0;
14 }
15 }