aboutsummaryrefslogtreecommitdiff
path: root/test/if-char.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-10-18 10:41:49 -0700
committerMichael Forney <mforney@mforney.org>2021-10-18 10:45:44 -0700
commitbadc674ce4e77cd29645cd1cd9df5e57f47e08ae (patch)
tree25493fb7ff9f31f40b23f2a5a94d229e00777b29 /test/if-char.c
parent043879980822bb15d4d580a2ce36b99f0c73fa83 (diff)
qbe: Fix jnz controlled by short/char type
Although we don't need the cnew in this case, we still need to do the appropriate extension to 32-bit.
Diffstat (limited to 'test/if-char.c')
-rw-r--r--test/if-char.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/if-char.c b/test/if-char.c
new file mode 100644
index 0000000..c22d767
--- /dev/null
+++ b/test/if-char.c
@@ -0,0 +1,5 @@
+int main(void) {
+ if ((unsigned char)0x100)
+ return 1;
+ return 0;
+}