aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-12-06 13:58:50 -0800
committerMichael Forney <mforney@mforney.org>2021-12-06 13:59:11 -0800
commitaefb830ede6316f5fcf4c3c48b79a661c66c9f2e (patch)
tree0353766f49e74d60124d2d50ebf8216a8958bed1 /test
parent673a92cead5dbc453a2234baffafb250cc1f41b6 (diff)
decl: Fix typedefs with type qualifiers
Previously, the qualifiers were saved, but accidentally ignored when the typedef was referenced.
Diffstat (limited to 'test')
-rw-r--r--test/typedef-qual.c3
-rw-r--r--test/typedef-qual.qbe1
2 files changed, 4 insertions, 0 deletions
diff --git a/test/typedef-qual.c b/test/typedef-qual.c
new file mode 100644
index 0000000..b027dab
--- /dev/null
+++ b/test/typedef-qual.c
@@ -0,0 +1,3 @@
+typedef const int T;
+const int x;
+T x;
diff --git a/test/typedef-qual.qbe b/test/typedef-qual.qbe
new file mode 100644
index 0000000..7cf0e40
--- /dev/null
+++ b/test/typedef-qual.qbe
@@ -0,0 +1 @@
+export data $x = align 4 { z 4 }