From 8c62cc2064826ab75f2ad89adcb862f4555c00ed Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Thu, 25 Aug 2022 00:53:31 -0400 Subject: [PATCH] Add MaybeUninit memset test Signed-off-by: Alex Saveau --- src/test/codegen/issue-96274.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/codegen/issue-96274.rs diff --git a/src/test/codegen/issue-96274.rs b/src/test/codegen/issue-96274.rs new file mode 100644 index 0000000000000..e3abf73096125 --- /dev/null +++ b/src/test/codegen/issue-96274.rs @@ -0,0 +1,11 @@ +// min-llvm-version: 15.0 +// compile-flags: -O + +#![crate_type = "lib"] + +use std::mem::MaybeUninit; + +pub fn maybe_uninit() -> [MaybeUninit; 3000] { + // CHECK-NOT: memset + [MaybeUninit::uninit(); 3000] +}