]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/unwind-and-panic-abort.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[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 }