aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-16 03:39:03 -0800
committerMichael Forney <mforney@mforney.org>2019-02-16 03:56:58 -0800
commit18ad54b003608f3060d4baf2fef00a8a2b6f0a7b (patch)
tree16b77a846ae70281c70a51fd253285e3abdb39a7 /tests
parent6dee4df79d5f251d12e387d8425e2b05cdd60523 (diff)
downloadcproc-18ad54b003608f3060d4baf2fef00a8a2b6f0a7b.tar.xz
Allow labels with same name as typedef
Diffstat (limited to 'tests')
-rw-r--r--tests/label-typedef.c4
-rw-r--r--tests/label-typedef.qbe7
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/label-typedef.c b/tests/label-typedef.c
new file mode 100644
index 0000000..f3744e3
--- /dev/null
+++ b/tests/label-typedef.c
@@ -0,0 +1,4 @@
+typedef int x;
+void f(void) {
+x:;
+}
diff --git a/tests/label-typedef.qbe b/tests/label-typedef.qbe
new file mode 100644
index 0000000..b11f621
--- /dev/null
+++ b/tests/label-typedef.qbe
@@ -0,0 +1,7 @@
+export
+function $f() {
+@start.1
+@body.2
+@x.3
+ ret
+}