https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80732
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- > double (*pf1)(double, double, double) = dlsym(hdl, "f1"); Ok, so here we have problem that usage of target_attribute for a function f1, generates: f1 (default implementation), f1.fma (fma implementation), f1.resolver and f1.ifunc (which is ifunc alias pointing to f1.resolver). That said, here fix is: double (*pf1)(double, double, double) = dlsym(hdl, "f1.ifunc"); > double (*pk1)(double, double, double, void**) = dlsym(hdl, "k1"); > double (*_pf1)(double, double, double); This one is really issue as GCC does not redirect: double k1(double a, double b, double c, void **p) { *p = f1; return f1(a, b, c); } to *p = f1.func. I'll attach patch candidate.