about summary refs log tree commit diff
path: root/src/test/codegen/scalar-function-call.cc
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2013-07-16 17:42:28 -0700
committerGraydon Hoare <graydon@mozilla.com>2013-07-16 17:44:57 -0700
commit40f74341f3ba2cee2afedb31014ee14432d700cd (patch)
treeef23525a041d4adc8f8898ffd9e375962cee7776 /src/test/codegen/scalar-function-call.cc
parent53e934c2ab773eaf61da331893d176aa3e62230b (diff)
downloadrust-40f74341f3ba2cee2afedb31014ee14432d700cd.tar.gz
rust-40f74341f3ba2cee2afedb31014ee14432d700cd.zip
test: new codegen tests, rename hello.
Diffstat (limited to 'src/test/codegen/scalar-function-call.cc')
-rw-r--r--src/test/codegen/scalar-function-call.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/codegen/scalar-function-call.cc b/src/test/codegen/scalar-function-call.cc
new file mode 100644
index 00000000000..91ed882f68a
--- /dev/null
+++ b/src/test/codegen/scalar-function-call.cc
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+
+size_t foo(size_t x) {
+    return x * x;
+}
+
+extern "C"
+void test() {
+    size_t x = foo(10);
+}