summaryrefslogtreecommitdiffstats
path: root/tests/codegen/alloc-optimisation.rs
blob: c3ffaeb9547b3c20a43168cc88d3aed04cbb29d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}