https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98734
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #5) > Note, always_inline is not a guarantee out of line copy will not be emitted. > Either because address of the always_inline function is taken and not > optimized in all places into a direct call, or when using > -fkeep-inline-functions. > So, not emitting -Wpsabi in those cases looks wrong (sure, perhaps it could > be somehow restricted to the cases where the function body is actually > emitted, so for DECL_DISREGARD_INLINE_LIMITS don't warn when processing the > function declaration and repeat the diagnostics for > DECL_DISREGARD_INLINE_LIMITS functions when emitting the body. > Though wonder if that would cover the always_inline,gnu_inline extern inline > cases where we emit a call to the external definition. I think the warning should be emitted only when the function body is emitted and is either address taken or has non-local linkage. Note always-inline is DECL_DISREGARD_INLINE_LIMITS && lookup_attribute ("always_inline", ... only for those inlining is guaranteed (apart from the "bugs" with address-taking that we fail to diagnose). I suppose cgraph_node->can_change_signature might be an indicator that the ABI (and thus related warnings) is not relevant.