From f3391dde28a8ab2a6652cd43c7f58cafa04a5861 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Mon, 18 Oct 2021 10:49:24 -0700 Subject: expr: Make sure __builtin_va_end argument is evaluated for side-effects --- test/varargs+riscv64.qbe | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') 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 } -- cgit v1.2.3