shithub: scc

Download patch

ref: 1539e81eb48b17a7d6da78a39480fedc6661bed0
parent: 264f6b0566d13ec568f36fe40865edb65f0db9f8
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jan 8 08:05:31 EST 2016

Fill test035.c

This test was only a skeleton of what should be tested.
This new version adds more complexity and it also adds
the desired output.

--- a/cc1/tests/test035.c
+++ b/cc1/tests/test035.c
@@ -3,7 +3,26 @@
 name: TEST035
 description: Basic test for enumerations
 output:
-
+F6	I	E
+G7	F6	main
+{
+\
+A8	I	e
+	A8	#I3	:I
+	j	L9	A8	#I1	=I
+	r	#I0
+L9
+	j	L10	A8	#I0	=I
+	r	#I1
+L10
+	j	L11	A8	#I2	=I
+	r	#I2
+L11
+	j	L12	A8	#I3	=I
+	r	#I3
+L12
+	r	#I0
+}
 */
 
 enum E {
@@ -16,15 +35,16 @@
 int
 main()
 {
-	enum E e;
+	enum E e = 3;
 
-	if(x != 0)
+	if (e !=1)
+		return 0;
+	if (e != x)
 		return 1;
-	if(y != 2)
+	if (e != y)
 		return 2;
-	if(z != 3)
+	if (e != z)
 		return 3;
 	
-	e = x;
 	return x;
 }