From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs | 4 ++++ src/test/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs | 6 ++++++ src/test/ui/sepcomp/auxiliary/sepcomp_lib.rs | 21 +++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 src/test/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs create mode 100644 src/test/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs create mode 100644 src/test/ui/sepcomp/auxiliary/sepcomp_lib.rs (limited to 'src/test/ui/sepcomp/auxiliary') diff --git a/src/test/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs b/src/test/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs new file mode 100644 index 000000000..73fb5e8f3 --- /dev/null +++ b/src/test/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs @@ -0,0 +1,4 @@ +#[no_mangle] +pub extern "C" fn foo() -> usize { + 1234 +} diff --git a/src/test/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs b/src/test/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs new file mode 100644 index 000000000..64e34a56d --- /dev/null +++ b/src/test/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs @@ -0,0 +1,6 @@ +#[inline] +pub fn cci_fn() -> usize { + 1200 +} + +pub const CCI_CONST: usize = 34; diff --git a/src/test/ui/sepcomp/auxiliary/sepcomp_lib.rs b/src/test/ui/sepcomp/auxiliary/sepcomp_lib.rs new file mode 100644 index 000000000..1536228c2 --- /dev/null +++ b/src/test/ui/sepcomp/auxiliary/sepcomp_lib.rs @@ -0,0 +1,21 @@ +// compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g + +pub mod a { + pub fn one() -> usize { + 1 + } +} + +pub mod b { + pub fn two() -> usize { + 2 + } +} + +pub mod c { + use a::one; + use b::two; + pub fn three() -> usize { + one() + two() + } +} -- cgit v1.2.3