https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89125
--- Comment #9 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Wed, Jan 30, 2019 at 09:10:25PM +0000, sgk at troutmask dot apl.washington.edu wrote: > > --- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- > > 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; > } > With the attached patch, there is an improvement in the the number of passing tests for gcc. Both g++ and gfortran are unchanged. === gcc Summary === # of expected passes 134938 # of unexpected failures 178 # of unexpected successes 27 # of expected failures 550 # of unresolved testcases 14 # of unsupported tests 2222 === g++ Summary === # of expected passes 124050 # of unexpected failures 42 # of expected failures 548 # of unsupported tests 5594 === gfortran Summary === # of expected passes 48999 # of unexpected failures 1 # of expected failures 130 # of unsupported tests 88 In code spelunking, I've inspected all of the builtins implied by the various function_* keywords. For FreeBSD, this comes down to function_c94 All functions available. function_c99_misc powl, tgammal exist but have precision issues function_c99_math_complex ccoshl, ccosl, cexpl, csinhl, csinl, ctanhl, ctanl. These functions are missing. cpow[fl] is available, but is from Cephes library. These have precisions issues on i686 and maybe 128-bit long double. function_c11_misc function available