about summary refs log tree commit diff
path: root/tests/codegen/alloc-optimisation.rs
blob: 8abeecf8550be3321a88fc5c8aa9b6329d237fca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ compile-flags: -Copt-level=3
#![crate_type = "lib"]

#[no_mangle]
pub fn alloc_test(data: u32) {
    // CHECK-LABEL: @alloc_test
    // CHECK-NEXT: start:
    // CHECK-NEXT: {{.*}} load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1
    // CHECK-NEXT: ret void
    let x = Box::new(data);
    drop(x);
}