Disable specific function call optimization

Mason slash.tmp@free.fr
Wed Apr 19 14:28:00 GMT 2017


Hello,

(I'm working on 32-bit arm in case it matters.)

There's an obvious optimization, when a function ends with
a function call, to issue a jump instead of a call.

Thus, upon return from the leaf function, we avoid a return
instruction. My problem is that this optimization breaks
tools that print function back traces :-)

I would guess the optimization is enabled by -foptimize-sibling-calls
So -fno-optimize-sibling-calls would disable it?

Regards.



More information about the Gcc-help mailing list