]> git.proxmox.com Git - rustc.git/blob - src/test/codegen/dealloc-no-unwind.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / codegen / dealloc-no-unwind.rs
1 // no-system-llvm
2 // compile-flags: -O
3
4 #![crate_type="lib"]
5
6 struct A;
7
8 impl Drop for A {
9 fn drop(&mut self) {
10 extern "C" { fn foo(); }
11 unsafe { foo(); }
12 }
13 }
14
15 #[no_mangle]
16 pub fn a(a: Box<i32>) {
17 // CHECK-LABEL: define{{.*}}void @a
18 // CHECK: call void @__rust_dealloc
19 // CHECK-NEXT: call void @foo
20 let _a = A;
21 drop(a);
22 }