aboutsummaryrefslogtreecommitdiff
path: root/check/code-gen
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-09 01:01:57 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-09 01:01:57 -0400
commitdfd4c9b09885fef5dff326925cceae44e49455b0 (patch)
treed09bae8528a80c0ac509b683f548f07f0e1c8814 /check/code-gen
parent64fbe9da1ab872b27b5f4dd3b46eb1a7b69d8245 (diff)
Update check files
Diffstat (limited to 'check/code-gen')
-rw-r--r--check/code-gen/assign.p6
-rw-r--r--check/code-gen/assign2.p14
-rw-r--r--check/code-gen/ifs.p37
-rw-r--r--check/code-gen/proc.p22
-rw-r--r--check/code-gen/write.p4
5 files changed, 83 insertions, 0 deletions
diff --git a/check/code-gen/assign.p b/check/code-gen/assign.p
new file mode 100644
index 0000000..f8473f0
--- /dev/null
+++ b/check/code-gen/assign.p
@@ -0,0 +1,6 @@
+program main (output);
+ var a,b,c,d,e: integer;
+begin
+ a := 1;
+ write(a)
+end.
diff --git a/check/code-gen/assign2.p b/check/code-gen/assign2.p
new file mode 100644
index 0000000..7d94abc
--- /dev/null
+++ b/check/code-gen/assign2.p
@@ -0,0 +1,14 @@
+program main (output);
+ var a,b,c,d,e: integer;
+begin
+ a := 1;
+ b := 2;
+ c := 3;
+ d := 4;
+ e := 5;
+ write(a);
+ write(b);
+ write(c);
+ write(d);
+ write(e)
+end.
diff --git a/check/code-gen/ifs.p b/check/code-gen/ifs.p
new file mode 100644
index 0000000..533eadc
--- /dev/null
+++ b/check/code-gen/ifs.p
@@ -0,0 +1,37 @@
+program main ();
+ var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o: integer;
+ var rb,rc,rd,re,rf,rg,rh,ri,rj,rk,rl,rm,rn,ro: real;
+begin
+ a := 0;
+ if ( 1 = 2 ) then b:= 1;
+ if ( 1.1 = 2.1 ) then c:=0;
+ b := 1;
+ c := 1;
+ d := 1;
+ e := 1;
+ f := 1;
+ g := 1;
+ h := 1;
+ i := 1;
+ j := 1;
+ k := 1;
+ l := 1;
+ m := 1;
+ n := 1;
+ o := 1;
+
+ rb := 1.0;
+ rc := 1.0;
+ rd := 1.0;
+ re := 1.0;
+ rf := 1.0;
+ rg := 1.0;
+ rh := 1.0;
+ ri := 1.0;
+ rj := 1.0;
+ rk := 1.0;
+ rl := 1.0;
+ rm := 1.0;
+ rn := 1.0;
+ ro := 1.0
+end.
diff --git a/check/code-gen/proc.p b/check/code-gen/proc.p
new file mode 100644
index 0000000..6d43ebf
--- /dev/null
+++ b/check/code-gen/proc.p
@@ -0,0 +1,22 @@
+program main (output);
+ procedure bar (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o: integer);
+ begin
+ write(a);
+ write(b);
+ write(c);
+ write(d);
+ write(e);
+ write(f);
+ write(g);
+ write(h);
+ write(i);
+ write(j);
+ write(k);
+ write(l);
+ write(m);
+ write(n);
+ write(o)
+ end;
+begin
+ bar(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
+end.
diff --git a/check/code-gen/write.p b/check/code-gen/write.p
new file mode 100644
index 0000000..2201bc4
--- /dev/null
+++ b/check/code-gen/write.p
@@ -0,0 +1,4 @@
+program main (output);
+begin
+ write(1)
+end.