summaryrefslogtreecommitdiff
path: root/examples/gfcc/compiler/demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gfcc/compiler/demo.c')
-rw-r--r--examples/gfcc/compiler/demo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/gfcc/compiler/demo.c b/examples/gfcc/compiler/demo.c
new file mode 100644
index 000000000..d9a95d2b6
--- /dev/null
+++ b/examples/gfcc/compiler/demo.c
@@ -0,0 +1,9 @@
+int fact (int n) {
+ int f ;
+ f = 1 ;
+ while (1 < n) {
+ f = n * f ;
+ n = n - 1 ;
+ }
+ return f ;
+} ;