2017-06-08 09:18:05 -05:00
|
|
|
//
|
2021-10-06 04:22:03 -05:00
|
|
|
// no-system-llvm
|
2017-06-08 09:18:05 -05:00
|
|
|
// compile-flags: -O
|
2022-09-10 06:33:44 -05:00
|
|
|
#![crate_type = "lib"]
|
2017-06-03 07:07:57 -05:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn alloc_test(data: u32) {
|
|
|
|
// CHECK-LABEL: @alloc_test
|
|
|
|
// CHECK-NEXT: start:
|
2022-09-10 06:33:44 -05:00
|
|
|
// CHECK-NEXT: {{.*}} load volatile i8, ptr @__rust_no_alloc_shim_is_unstable, align 1
|
2017-06-03 07:07:57 -05:00
|
|
|
// CHECK-NEXT: ret void
|
|
|
|
let x = Box::new(data);
|
|
|
|
drop(x);
|
|
|
|
}
|