https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89125
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Wed, Jan 30, 2019 at 08:47:50PM +0000, glisse at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89125 > > --- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> --- > This looks like a target issue, gcc does produce a call to sincos here. So > please specify your target precisely. > Yes, it seems to be a target issue. It's i585-*-freebsd and x86_64-*-freebsd. I've found that gcc/config/freebsd.h contains #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function AFAIK, FreeBSD is C99 compliant. This is an area I haven't worked in. I might be able to change this to default_libc_has_function, but that doesn't include sincos. So, it seems I need a function, perhaps, bsd_libc_has_function in targhooks.[ch] /* Assume that c99 functions are present at the runtime, including sincos. */ bool bsd_libc_has_function (enum function_class fn_class) { if (fn_class == function_c94 || fn_class == function_c99_misc || fn_class == function_c99_math_complex || fn_class == function_sincos) return true; return false; }