https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62287
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ramana at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- If you use -mlong-calls in these particular cases, you should be able to work around the problem. The documentation for this feature states the following. Even if this switch is enabled, not all function calls are turned into long calls. The heuristic is that static functions, functions that have the @code{short_call} attribute, functions that are inside the scope of a @code{#pragma no_long_calls} directive, and functions whose definitions have already been compiled within the current compilation unit are not turned into long calls. The exceptions to this rule are that weak function definitions, functions with the @code{long_call} attribute or the @code{section} attribute, and functions that are within the scope of a @code{#pragma long_calls} directive are always turned into long calls. I would read the exceptions to the rule as part of the #pragma no_long_calls directive rather than anythign else. I'm not sure there's much for the compiler to do here.