summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/unwind-and-panic-abort.rs
blob: f238741e599f68242616ecbaf5150baf0d13a842 (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 @_ZN4core9panicking15panic_no_unwind
#[no_mangle]
pub unsafe extern "C" fn foo() {
    bar();
}