[hackers] [scc] Add basic test for long constants || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 7 Sep 2015 23:44:57 +0200 (CEST)

commit dc544bd4b9662bdb72af33fc1120f3c189fa0308
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Sep 7 23:34:01 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Sep 7 23:36:07 2015 +0200

    Add basic test for long constants

diff --git a/cc1/tests/test023.c b/cc1/tests/test023.c
new file mode 100644
index 0000000..942db82
--- /dev/null
+++ b/cc1/tests/test023.c
_AT_@ -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;
+}
Received on Mon Sep 07 2015 - 23:44:57 CEST

This archive was generated by hypermail 2.3.0 : Mon Sep 07 2015 - 23:48:19 CEST