[PATCH] PR middle-end/71524: IFUNC resolver may resolve to a non-local function

Alexander Monakov amonakov@ispras.ru
Sun Jun 26 12:37:00 GMT 2016

On Sat, 25 Jun 2016, H.J. Lu wrote:
> The resolver for ifunc functions might resolve to a non-local function.

I think the explanation doesn't match the testcase, in which all three
functions: the resolver, the symbol being resolved, and the ultimate
resolution are all static. I don't think there was an intention to allow the
resolver reside in a different translation unit than the resolvee, so the
comment also seems confusing if not wrong.

I can't speak to the validity of the code change, but if it's accepted, please
improve the comment to say why ifuncs are treated specially. I would say
something like "Reject indirect functions, even if they are not externally
visible: they need to be treated like interposable (and the definition can
only refer to the resolver, which is not useful for optimization)".


More information about the Gcc-patches mailing list