]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/alloc-optimisation.rs
Add llvm.sideeffect to potential infinite loops and recursions
[rust.git] / src / test / codegen / alloc-optimisation.rs
1 //
2 // no-system-llvm
3 // compile-flags: -O
4 #![crate_type="lib"]
5
6 #[no_mangle]
7 pub fn alloc_test(data: u32) {
8     // CHECK-LABEL: @alloc_test
9     // CHECK-NEXT: start:
10     // CHECK-NOT: alloc
11     // CHECK: ret void
12     let x = Box::new(data);
13     drop(x);
14 }