From ce328676f8ef7a643b3dea2038ab01491a9c8aad Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Fri, 6 Jan 2023 00:05:41 +0900 Subject: [PATCH] Add regression test for #100772 Signed-off-by: Yuki Okushi --- src/test/ui/lto/issue-100772.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/test/ui/lto/issue-100772.rs diff --git a/src/test/ui/lto/issue-100772.rs b/src/test/ui/lto/issue-100772.rs new file mode 100644 index 0000000000000..b2b7230dad561 --- /dev/null +++ b/src/test/ui/lto/issue-100772.rs @@ -0,0 +1,10 @@ +// run-pass +// needs-sanitizer-cfi +// compile-flags: -Zsanitizer=cfi -Clto +// no-prefer-dynamic + +#![feature(allocator_api)] + +fn main() { + let _ = Box::new_in(&[0, 1], &std::alloc::Global); +}