diff options
author | Michael Forney <mforney@mforney.org> | 2021-10-18 10:49:24 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-10-18 10:49:24 -0700 |
commit | f3391dde28a8ab2a6652cd43c7f58cafa04a5861 (patch) | |
tree | c1bae2ac7422e1efdccc371d21e313942d041cd5 /test | |
parent | badc674ce4e77cd29645cd1cd9df5e57f47e08ae (diff) |
expr: Make sure __builtin_va_end argument is evaluated for side-effects
Diffstat (limited to 'test')
-rw-r--r-- | test/varargs+riscv64.qbe | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/varargs+riscv64.qbe b/test/varargs+riscv64.qbe index a918014..48638bb 100644 --- a/test/varargs+riscv64.qbe +++ b/test/varargs+riscv64.qbe @@ -22,8 +22,9 @@ function w $f2(w %.1, ...) { %.6 =l loadl %.4 %.7 =w call $f1(w %.5, l %.6) storew %.7, %.3 - %.8 =w loadw %.3 - ret %.8 + %.8 =l loadl %.4 + %.9 =w loadw %.3 + ret %.9 } export function $f3(w %.1, ...) { @@ -45,5 +46,6 @@ function $f3(w %.1, ...) { storew %.9, %.2 jmp @while_cond.7 @while_join.9 + %.10 =l loadl %.3 ret } |