shithub: scc

Download patch

ref: 96af781fb1b2977e7c357afa2b16b2c6d1620bb3
parent: d9bbd7ad7628e10d605a7958db16a432164c4a1d
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Aug 15 15:59:47 EDT 2015

Add basic while loop

--- /dev/null
+++ b/cc1/tests/test007.c
@@ -1,0 +1,32 @@
+/*
+name: TEST007
+description: basic while test
+output:
+F1
+G1	F1	main
+{
+-
+A2	I	x
+	A2	#IA	:I
+	j	L5
+	d
+L3
+	A2	A2	#I1	-I	:I
+L5
+	j	L3	A2	#I0	!I
+	b
+L4
+	yI	A2
+}
+*/
+
+int
+main()
+{
+	int x;
+	
+	x = 10;
+	while (x)
+		x = x - 1;
+	return x;
+}