]> git.proxmox.com Git - rustc.git/blob - src/test/ui/abi/extern/extern-pass-double.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / abi / extern / extern-pass-double.rs
1 // run-pass
2 // ignore-wasm32-bare no libc for ffi testing
3
4 #[link(name = "rust_test_helpers", kind = "static")]
5 extern "C" {
6 pub fn rust_dbg_extern_identity_double(v: f64) -> f64;
7 }
8
9 pub fn main() {
10 unsafe {
11 assert_eq!(22.0_f64, rust_dbg_extern_identity_double(22.0_f64));
12 }
13 }