Skip to content

Commit 685c4d0

Browse files
committed
add rust_dbg_extern_identity_TwoDoubles to prevent check-fast failure
1 parent 4ad8ec3 commit 685c4d0

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

src/rt/rust_builtin.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,16 @@ rust_dbg_extern_identity_TwoU64s(TwoU64s u) {
866866
return u;
867867
}
868868

869+
struct TwoDoubles {
870+
double one;
871+
double two;
872+
};
873+
874+
extern "C" CDECL TwoDoubles
875+
rust_dbg_extern_identity_TwoDoubles(TwoDoubles u) {
876+
return u;
877+
}
878+
869879
extern "C" CDECL double
870880
rust_dbg_extern_identity_double(double u) {
871881
return u;

src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ rust_opendir
199199
rust_dbg_extern_identity_u32
200200
rust_dbg_extern_identity_u64
201201
rust_dbg_extern_identity_TwoU64s
202+
rust_dbg_extern_identity_TwoDoubles
202203
rust_dbg_extern_identity_double
203204
rust_dbg_extern_identity_u8
204205
rust_get_rt_env

src/test/run-pass/issue-5754.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
struct S {
12-
r: float
11+
struct TwoDoubles {
12+
r: float,
13+
i: float
1314
}
1415

1516
extern "C" {
16-
fn rust_dbg_extern_identity_double(arg1: S) -> float;
17+
fn rust_dbg_extern_identity_TwoDoubles(arg1: TwoDoubles) -> TwoDoubles;
1718
}
1819

1920
pub fn main() {}

0 commit comments

Comments
 (0)