summaryrefslogtreecommitdiffstats
path: root/tests/ui/sepcomp/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/sepcomp/auxiliary')
-rw-r--r--tests/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs4
-rw-r--r--tests/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs6
-rw-r--r--tests/ui/sepcomp/auxiliary/sepcomp_lib.rs21
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs b/tests/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs
new file mode 100644
index 000000000..73fb5e8f3
--- /dev/null
+++ b/tests/ui/sepcomp/auxiliary/sepcomp-extern-lib.rs
@@ -0,0 +1,4 @@
+#[no_mangle]
+pub extern "C" fn foo() -> usize {
+ 1234
+}
diff --git a/tests/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs b/tests/ui/sepcomp/auxiliary/sepcomp_cci_lib.rs
new file mode 100644
index 000000000..64e34a56d
--- /dev/null
+++ b/tests/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/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs b/tests/ui/sepcomp/auxiliary/sepcomp_lib.rs
new file mode 100644
index 000000000..1536228c2
--- /dev/null
+++ b/tests/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()
+ }
+}