aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/const-expr-cast.c7
-rw-r--r--test/const-expr-cast.qbe3
2 files changed, 10 insertions, 0 deletions
diff --git a/test/const-expr-cast.c b/test/const-expr-cast.c
new file mode 100644
index 0000000..10a3eac
--- /dev/null
+++ b/test/const-expr-cast.c
@@ -0,0 +1,7 @@
+enum {
+ A = (unsigned char)0x321,
+ B = (short)-2147438112,
+ C = 0x80000003 * 2,
+};
+
+int a = A, b = B, c = C;
diff --git a/test/const-expr-cast.qbe b/test/const-expr-cast.qbe
new file mode 100644
index 0000000..b36aefc
--- /dev/null
+++ b/test/const-expr-cast.qbe
@@ -0,0 +1,3 @@
+export data $a = align 4 { w 33, }
+export data $b = align 4 { w 18446744073709531616, }
+export data $c = align 4 { w 6, }