diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/add-int-pointer.c | 4 | ||||
-rw-r--r-- | tests/add-int-pointer.qbe | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/add-int-pointer.c b/tests/add-int-pointer.c new file mode 100644 index 0000000..be1a60f --- /dev/null +++ b/tests/add-int-pointer.c @@ -0,0 +1,4 @@ +int x[2]; +void f(void) { + 1 + x; +} diff --git a/tests/add-int-pointer.qbe b/tests/add-int-pointer.qbe new file mode 100644 index 0000000..22825ee --- /dev/null +++ b/tests/add-int-pointer.qbe @@ -0,0 +1,10 @@ +export +function $f() { +@start.1 +@body.2 + %.1 =l extsw 1 + %.2 =l mul %.1, 4 + %.3 =l add $x, %.2 + ret +} +export data $x = align 4 { z 8 } |