aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression')
-rw-r--r--test/regression/Makefile2
-rw-r--r--test/regression/Results/funct32
-rw-r--r--test/regression/funct3.c14
3 files changed, 17 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile
index a86f7d93..8407329f 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -7,7 +7,7 @@ CCOMPFLAGS=-stdlib ../../runtime -dparse -dclight -dasm \
LIBS=$(LIBMATH)
# Can run and have reference output in Results
-TESTS=bitfields1 expr1 initializers volatile2
+TESTS=bitfields1 expr1 initializers volatile2 funct3
# Other tests: should compile to .s without errors (but expect warnings)
EXTRAS=commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \
diff --git a/test/regression/Results/funct3 b/test/regression/Results/funct3
new file mode 100644
index 00000000..62a2d00a
--- /dev/null
+++ b/test/regression/Results/funct3
@@ -0,0 +1,2 @@
+7616
+226
diff --git a/test/regression/funct3.c b/test/regression/funct3.c
new file mode 100644
index 00000000..8a1acded
--- /dev/null
+++ b/test/regression/funct3.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+unsigned char foo (unsigned short n)
+{
+ printf("%d\n", n);
+ return -30;
+}
+
+int main (void)
+{
+ int x = foo(-123456);
+ printf("%d\n", x);
+ return 0;
+}