]> git.proxmox.com Git - rustc.git/blame - src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / codegen / unwind-abis / c-unwind-abi-panic-abort.rs
CommitLineData
6a06907d
XL
1// compile-flags: -C panic=abort -C opt-level=0
2
3// Test that `nounwind` atributes are applied to `C-unwind` extern functions when the
4// code is compiled with `panic=abort`. We disable optimizations above to prevent LLVM from
5// inferring the attribute.
6
7#![crate_type = "lib"]
8#![feature(c_unwind)]
9
10// CHECK: @rust_item_that_can_unwind() unnamed_addr #0 {
11#[no_mangle]
12pub extern "C-unwind" fn rust_item_that_can_unwind() {
13}
14
15// Now, make sure that the LLVM attributes for this functions are correct. First, make
16// sure that the first item is correctly marked with the `nounwind` attribute:
17//
18// CHECK: attributes #0 = { {{.*}}nounwind{{.*}} }