rust/src/test/codegen/ffi-returns-twice.rs

16 lines
295 B
Rust
Raw Normal View History

2019-02-09 15:55:30 +01:00
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
#![feature(ffi_returns_twice)]
extern {
// CHECK-LABEL: @foo()
// CHECK: attributes #1 = { {{.*}}returns_twice{{.*}} }
#[no_mangle]
#[ffi_returns_twice]
pub fn foo();
}
pub fn bar() {
unsafe { foo() }
}