diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/builtin-alloca.c | 3 | ||||
-rw-r--r-- | tests/builtin-alloca.qbe | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/builtin-alloca.c b/tests/builtin-alloca.c new file mode 100644 index 0000000..f086f19 --- /dev/null +++ b/tests/builtin-alloca.c @@ -0,0 +1,3 @@ +void f(void) { + int *x = __builtin_alloca(32); +} diff --git a/tests/builtin-alloca.qbe b/tests/builtin-alloca.qbe new file mode 100644 index 0000000..75a1fe1 --- /dev/null +++ b/tests/builtin-alloca.qbe @@ -0,0 +1,12 @@ +export +function $f() { +@start.1 + %.1 =l alloc8 8 +@body.2 + %.2 =l add %.1, 0 + %.3 =l extsw 32 + %.4 =l alloc16 %.3 + %.5 =l copy %.4 + storel %.5, %.2 + ret +} |