Closed
Description
In this example:
use std::mem::MaybeUninit;
extern {
fn fill(p: *mut u16);
}
pub unsafe fn test() {
let (mut buffer, mut buffer2): ([u16; 512], [u16; 256]) = MaybeUninit::uninit().assume_init();
fill(buffer.as_mut_ptr());
fill(buffer2.as_mut_ptr())
}
there is a call to memcpy
for one of the buffers that copies uninitialized data to it.
https://rust.godbolt.org/z/z1zcor
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Issue: Problems and improvements with respect to performance of generated code.High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.