From 495a1c79940e9f4cb1db8250719897ee3bfef732 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 20 Jan 2025 09:06:38 +0900 Subject: [PATCH] [qfcc] Dereference explicit intrinsic arg references The dereferencing was done for implicit intrinsic args, but I had forgotten about it for explicit intrinsics. Now the scalar `a` version of `mix` works. --- tools/qfcc/source/expr_call.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qfcc/source/expr_call.c b/tools/qfcc/source/expr_call.c index 5d69b5a9b..50f631661 100644 --- a/tools/qfcc/source/expr_call.c +++ b/tools/qfcc/source/expr_call.c @@ -273,6 +273,9 @@ build_intrinsic_call (const expr_t *expr, symbol_t *fsym, const type_t *ftype, current_symtab = func->locals; for (int i = 0; i < extra_count; i++) { extra_args[i] = expr_process (extra_args[i], ctx); + if (is_reference (get_type (extra_args[i]))) { + extra_args[i] = pointer_deref (extra_args[i]); + } } current_symtab = scope; list_gather (&call->intrinsic.operands, extra_args, extra_count);