From 48a8d23b971fb11c19ace8bf821c2c25a10f052a Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 30 Oct 2017 18:21:06 +0100 Subject: [PATCH] Update run-make tests. --- src/test/run-make/issue-7349/foo.rs | 2 ++ src/test/run-make/sepcomp-separate/foo.rs | 8 +++++++- src/test/run-make/symbols-are-reasonable/lib.rs | 3 ++- src/test/run-make/symbols-include-type-name/lib.rs | 5 +++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/test/run-make/issue-7349/foo.rs b/src/test/run-make/issue-7349/foo.rs index 6c39b33be08..b75c82afb53 100644 --- a/src/test/run-make/issue-7349/foo.rs +++ b/src/test/run-make/issue-7349/foo.rs @@ -13,6 +13,7 @@ fn outer() { fn inner() -> u32 { 8675309 } + inner(); } extern "C" fn outer_foreign() { @@ -20,6 +21,7 @@ extern "C" fn outer_foreign() { fn inner() -> u32 { 11235813 } + inner(); } fn main() { diff --git a/src/test/run-make/sepcomp-separate/foo.rs b/src/test/run-make/sepcomp-separate/foo.rs index bfa2162e27d..64a76e9e0ed 100644 --- a/src/test/run-make/sepcomp-separate/foo.rs +++ b/src/test/run-make/sepcomp-separate/foo.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. + + fn magic_fn() -> usize { 1234 } @@ -24,4 +26,8 @@ mod b { } } -fn main() { } +fn main() { + magic_fn(); + a::magic_fn(); + b::magic_fn(); +} diff --git a/src/test/run-make/symbols-are-reasonable/lib.rs b/src/test/run-make/symbols-are-reasonable/lib.rs index ff56ed62869..b9285b24cd6 100644 --- a/src/test/run-make/symbols-are-reasonable/lib.rs +++ b/src/test/run-make/symbols-are-reasonable/lib.rs @@ -14,7 +14,8 @@ pub static Y: &'static [u8] = include_bytes!("lib.rs"); trait Foo { fn dummy(&self) { } } impl Foo for usize {} -pub fn dummy() { +#[no_mangle] +pub extern "C" fn dummy() { // force the vtable to be created let _x = &1usize as &Foo; } diff --git a/src/test/run-make/symbols-include-type-name/lib.rs b/src/test/run-make/symbols-include-type-name/lib.rs index 1c478ed2598..d84f1617db5 100644 --- a/src/test/run-make/symbols-include-type-name/lib.rs +++ b/src/test/run-make/symbols-include-type-name/lib.rs @@ -17,3 +17,8 @@ impl Def { Def { id: id } } } + +#[no_mangle] +pub fn user() { + let _ = Def::new(0); +}