summaryrefslogtreecommitdiffstats
path: root/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c')
-rw-r--r--tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c b/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c
new file mode 100644
index 000000000..e3f24828b
--- /dev/null
+++ b/tests/run-make/cross-lang-lto-pgo-smoketest/cmain.c
@@ -0,0 +1,12 @@
+#include <stdint.h>
+
+// A trivial function defined in Rust, returning a constant value. This should
+// always be inlined.
+uint32_t rust_always_inlined();
+
+
+uint32_t rust_never_inlined();
+
+int main(int argc, char** argv) {
+ return (rust_never_inlined() + rust_always_inlined()) * 0;
+}