aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-17 17:03:01 -0800
committerMichael Forney <mforney@mforney.org>2019-02-17 19:05:05 -0800
commit27e77f6ca6872c8d332c2e153773ca226d69fb64 (patch)
tree224c3a58fcee902148ad6fbebb0cb4ea39b0e8db /tests
parent132e0c466c4198445f8e327c291ab38fe79f6032 (diff)
downloadcproc-27e77f6ca6872c8d332c2e153773ca226d69fb64.tar.xz
Make enum types compatible with their corresponding integer type (int)
Diffstat (limited to 'tests')
-rw-r--r--tests/compatible-enum-types.c3
-rw-r--r--tests/compatible-enum-types.qbe1
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/compatible-enum-types.c b/tests/compatible-enum-types.c
new file mode 100644
index 0000000..e320966
--- /dev/null
+++ b/tests/compatible-enum-types.c
@@ -0,0 +1,3 @@
+enum E {A = -1, B};
+enum E x;
+int x;
diff --git a/tests/compatible-enum-types.qbe b/tests/compatible-enum-types.qbe
new file mode 100644
index 0000000..7cf0e40
--- /dev/null
+++ b/tests/compatible-enum-types.qbe
@@ -0,0 +1 @@
+export data $x = align 4 { z 4 }