From: Robert Pengelly Date: Wed, 16 Sep 2026 02:37:34 +0000 (+0100) Subject: Fixed function pointer usage not marking functions as used X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=a2a0f4ea96da8b378309db3a9717274abc50b137;p=scc.git Fixed function pointer usage not marking functions as used --- diff --git a/amd64.c b/amd64.c index 25c9922..92b2384 100644 --- a/amd64.c +++ b/amd64.c @@ -26641,11 +26641,16 @@ static int amd64_emit_bare_64bit_identifier_to_rax_now (void) { if (!sym && find_global_symbol (name) >= 0 && get_global_symbol_kind (name) == GLOBAL_SYMBOL_FUNCTION) { - emit_load_address_to_reg_now ("rax", name); + int function_symbol_index = find_global_symbol (name); + + if (function_symbol_index >= 0) { + global_symbols[function_symbol_index].used = 1; + } + emit_load_address_to_reg_now ("rax", name); get_token (); - free (name); + free (name); return 1; }