summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
blob: 2783c83d3efe08e6c94827e33dfe89e45cc28999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// compile-flags: -C opt-level=0
// ignore-wasm32-bare compiled with panic=abort by default

#![crate_type = "lib"]

// We disable optimizations to prevent LLVM from infering the attribute.

extern "C" {
    fn bar();
}

// CHECK-NOT: Function Attrs:{{.*}}nounwind
pub unsafe extern "C" fn foo() {
    bar();
}

// Note that this test will get removed when `C-unwind` is fully stabilized