# scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

```commit dc544bd4b9662bdb72af33fc1120f3c189fa0308
parent 153d5c396bcf4e67cb2937f06f59c6346b57c4bf
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon,  7 Sep 2015 23:34:01 +0200

Add basic test for long constants

Diffstat:
cc1/tests/test023.c | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```
```1 file changed, 57 insertions(+), 0 deletions(-)
diff --git a/cc1/tests/test023.c b/cc1/tests/test023.c
@@ -0,0 +1,57 @@
+
+/*
+name: TEST023
+description: Basic test for long constants
+comments: This test is done for z80 data types
+output:
+F1
+G1	F1	main
+{
+-
+A2	W	i
+A3	Z	u
+	A2	#W1	:W
+	A2	#WFFFFFFFF	:W
+	A2	#WFFFFFFFF	:W
+	A2	#WFFFFFFFF	:W
+	A2	#WFFFFFFFF	:W
+	A2	#W3	:W
+	A2	#W1	:W
+	A2	#W0	:W
+	A3	#Z1	:Z
+	A3	#ZFFFFFFFF	:Z
+	A3	#ZFFFFFFFF	:Z
+	A3	#ZFFFFFFFF	:Z
+	A3	#ZFFFFFFFF	:Z
+	A3	#Z3	:Z
+	A3	#Z1	:Z
+	A3	#Z0	:Z
+	y	#I0
+}
+*/
+
+int
+main(void)
+{
+	long i;
+	unsigned long u;
+
+	i = 1;
+	i = -1;
+	i = -1l;
+	i = -1u;
+	i = -1ll;
+	i = (1ll << 32) - 1 & 3;
+	i = (long) ((1ll << 32) - 1) < 0;
+	i = -1u < 0;
+
+	u = 1;
+	u = -1;
+	u = -1l;
+	u = -1u;
+	u = -1ll;
+	u = (1ll << 32) - 1 & 3;
+	u = (long) ((1ll << 32) - 1) < 0;
+	u = -1u < 0;
+	return 0;
+}
```