https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98734
--- Comment #6 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> --- I think I found it. Untested patch. Is this going in the right direction? diff --git i/gcc/function.cc w/gcc/function.cc index 2ad430a8013..45534b02c96 100644 --- i/gcc/function.cc +++ w/gcc/function.cc @@ -4027,7 +4027,7 @@ struct assign_parm_data_one void locate_and_pad_parm (machine_mode passed_mode, tree type, int in_regs, int reg_parm_stack_space, int partial, - tree fndecl ATTRIBUTE_UNUSED, + tree fndecl, struct args_size *initial_offset_ptr, struct locate_and_pad_arg_data *locate) { @@ -4063,10 +4063,17 @@ struct locate_and_pad_arg_data sizetree = (type ? arg_size_in_bytes (type) : size_int (GET_MODE_SIZE (passed_mode))); + + /* If the function is always inlined then psabi warnings are bogus. */ + const bool save_warn_psabi = warn_psabi; + if (TREE_CODE(fndecl) == FUNCTION_DECL + && DECL_DISREGARD_INLINE_LIMITS(fndecl)) + warn_psabi = false; where_pad = targetm.calls.function_arg_padding (passed_mode, type); boundary = targetm.calls.function_arg_boundary (passed_mode, type); round_boundary = targetm.calls.function_arg_round_boundary (passed_mode, type); + warn_psabi = save_warn_psabi; locate->where_pad = where_pad; /* Alignment can't exceed MAX_SUPPORTED_STACK_ALIGNMENT. */