summaryrefslogtreecommitdiffstats
path: root/tests/codegen/cross-crate-inlining/always-inline.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/codegen/cross-crate-inlining/always-inline.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/codegen/cross-crate-inlining/always-inline.rs b/tests/codegen/cross-crate-inlining/always-inline.rs
new file mode 100644
index 000000000..f3f08bf11
--- /dev/null
+++ b/tests/codegen/cross-crate-inlining/always-inline.rs
@@ -0,0 +1,13 @@
+// compile-flags: -O
+// aux-build:always.rs
+
+#![crate_type = "lib"]
+
+extern crate always;
+
+// Check that we inline a cross-crate call, even though it isn't a leaf
+#[no_mangle]
+pub fn outer() -> String {
+ // CHECK-NOT: call {{.*}}stem_fn
+ always::stem_fn()
+}