https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68743

--- Comment #18 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Sun, Dec 13, 2015 at 07:11:46PM +0000, dave.anglin at bell dot net wrote:
> 
> >  Perhaps, adding a few pessimizations will prevent gcc
> > from doing the optimization.
> 
> Will give these a whirl.
> 

I tried to get a _builtin_floorf on i386-*-freebsd with

#include <math.h>
#ifdef floorf
#undef floorf
#endif
float floorf(float);
float
floorf(float x) {
  return (float)floor(x);
}

% ~/work/bin/gcc -fdump-tree-all -c -O z.c
% grep _floorf z.c.* | more
z.c.001t.tu:@419    identifier_node  strg: __builtin_floorf        lngt: 16 

Inspection of the other z.c.* files show that floor is called.
Is hpux defining floorf someplace that the HAVE_FLOORF test in
libgfortran isn't picking up?

Another thing that you might try is adding an explicit
#undef floor
before the prototype in c99_functions.c.

Reply via email to