summary refs log tree commit diff
path: root/src/test/codegen/unwind-and-panic-abort.rs
blob: 05d97f3256aca28981b7ee04336d228089349565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// compile-flags: -C panic=abort

#![crate_type = "lib"]
#![feature(c_unwind)]

extern "C-unwind" {
    fn bar();
}

// CHECK: Function Attrs:{{.*}}nounwind
// CHECK-NEXT: define{{.*}}void @foo
// CHECK: call void @llvm.trap()
#[no_mangle]
pub unsafe extern "C" fn foo() {
    bar();
}