From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:13:28 +0100 Subject: Move /src/test to /tests --- tests/codegen/alloc-optimisation.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/codegen/alloc-optimisation.rs (limited to 'tests/codegen/alloc-optimisation.rs') diff --git a/tests/codegen/alloc-optimisation.rs b/tests/codegen/alloc-optimisation.rs new file mode 100644 index 00000000000..c3ffaeb9547 --- /dev/null +++ b/tests/codegen/alloc-optimisation.rs @@ -0,0 +1,13 @@ +// +// no-system-llvm +// compile-flags: -O +#![crate_type="lib"] + +#[no_mangle] +pub fn alloc_test(data: u32) { + // CHECK-LABEL: @alloc_test + // CHECK-NEXT: start: + // CHECK-NEXT: ret void + let x = Box::new(data); + drop(x); +} -- cgit 1.4.1-3-g733a5