https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125266

            Bug ID: 125266
           Summary: default_function_abi may not be the default function
                    ABI
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

default_function_abi is initialized by

  default_function_abi.initialize (0, regs_invalidated_by_call);

called from init_reg_sets_1 (), which calls

  targetm.conditional_register_usage ();

targetm.conditional_register_usage () can change call_used_regs and
fixed_regs based on function attributes, like preserve_none,
no_caller_saved_registers and no_callee_saved_registers.  As the
result, default_function_abi is the function ABI for the current function,
which may bot be the same as the default function ABI for call clobbered
registers.

Reply via email to