http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60235

--- Comment #5 from Mehdi Amini <joker.eph at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> The specialization is a regular function, not comdat, thus it is not
> appropriate to inline it at -O2 -fpic, only -O3 is inlining functions
> regardless to whether they could be interposed or not, or for -O2 without
> -fpic because the symbol can't be interposed.  Or use the inline keyword for
> the specialization.

As I understand your comment, O2 does not inline because of interposition
possibility, but O3 should break interposition? Note that -O3 does not inline
here either by the way.

Considering the (potentially huge) impact on the runtime, there should be a GCC
flag to disable "safe interposition" at compile time, as this "feature" isn't
use most of the time (I think). Unless you want to follow this path, you can
close this bug as "won't fix".

It is interesting to see that Clang does not seem to care about interposition
since the call disappears starting at O2.

Reply via email to