]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/unwind-and-panic-abort.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[rust.git] / src / test / codegen / unwind-and-panic-abort.rs
1 // compile-flags: -C panic=abort
2
3 #![crate_type = "lib"]
4 #![feature(c_unwind)]
5
6 extern "C-unwind" {
7     fn bar();
8 }
9
10 // CHECK: Function Attrs:{{.*}}nounwind
11 // CHECK-NEXT: define{{.*}}void @foo
12 // CHECK: call void @_ZN4core9panicking15panic_no_unwind
13 #[no_mangle]
14 pub unsafe extern "C" fn foo() {
15     bar();
16 }