diff options
-rw-r--r-- | test/string-concat.c | 3 | ||||
-rw-r--r-- | test/string-concat.qbe | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/string-concat.c b/test/string-concat.c new file mode 100644 index 0000000..12394ad --- /dev/null +++ b/test/string-concat.c @@ -0,0 +1,3 @@ +int main(void) { + return "\0" "1"[0]; +} diff --git a/test/string-concat.qbe b/test/string-concat.qbe new file mode 100644 index 0000000..54fb1ee --- /dev/null +++ b/test/string-concat.qbe @@ -0,0 +1,12 @@ +data $.Lstring.2 = align 1 { b "\0001\000", } +export +function w $main() { +@start.1 +@body.2 + %.1 =l extsw 0 + %.2 =l mul %.1, 1 + %.3 =l add $.Lstring.2, %.2 + %.4 =w loadsb %.3 + %.5 =w extsb %.4 + ret %.5 +} |