summaryrefslogtreecommitdiff
path: root/test/c/fib.c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-06-29 16:07:01 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2006-06-29 16:07:01 +0000
commit917e891d06e16516fe90e286f184062e6b7409fe (patch)
treedd5ea25f036abdb00a7b35b0caeac5e75cae82ed /test/c/fib.c
parenta29dfda37f01871db5b8e40d5312d08fc0ee53e3 (diff)
Version C des tests Cminor
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@40 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/c/fib.c')
-rw-r--r--test/c/fib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/c/fib.c b/test/c/fib.c
new file mode 100644
index 0000000..34e7baa
--- /dev/null
+++ b/test/c/fib.c
@@ -0,0 +1,7 @@
+int fib(int n)
+{
+ if (n < 2)
+ return 1;
+ else
+ return fib(n-1) + fib(n-2);
+}