aboutsummaryrefslogtreecommitdiff
path: root/tests/compare-char.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-02-16 20:47:45 -0800
committerMichael Forney <mforney@mforney.org>2019-02-16 20:51:11 -0800
commit7d746860bda62c2f382bc0ac82d4d6c8cdf6c7b2 (patch)
tree3b57414a9a175c04d529e43a4be672ee22c1f88d /tests/compare-char.qbe
parent18ad54b003608f3060d4baf2fef00a8a2b6f0a7b (diff)
Extend char/short types before comparing
Thanks to Andrew Chambers for reporting the issue.
Diffstat (limited to 'tests/compare-char.qbe')
-rw-r--r--tests/compare-char.qbe11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/compare-char.qbe b/tests/compare-char.qbe
new file mode 100644
index 0000000..a0a1c03
--- /dev/null
+++ b/tests/compare-char.qbe
@@ -0,0 +1,11 @@
+export
+function w $main() {
+@start.1
+@body.2
+ %.1 =w copy 0
+ %.2 =w copy 256
+ %.3 =w extub %.1
+ %.4 =w extub %.2
+ %.5 =w cultw %.3, %.4
+ ret %.5
+}