https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125623
--- Comment #4 from John David Anglin <danglin at gcc dot gnu.org> ---
With gfortran-16, we get:
bash-5.1$ cat foo.f90.006t.original
__attribute__((fn spec (". r w w w ")))
void foo (real(kind=16) & restrict x, real(kind=16) & restrict f,
integer(kind=4) & restrict n, real(kind=16) & restrict y)
{
integer(kind=4) m;
{
real(kind=16) D.1067;
integer(kind=4) D.1068;
D.1067 = *x;
*f = !(ABS_EXPR <D.1067> u>
1.18973149535723176508575932662800701619646905264169404553e+4932) ?
__builtin_frexpl (D.1067, &D.1068) : Nan;
}
{
real(kind=16) D.1069;
integer(kind=4) D.1070;
D.1069 = *x;
m = !(ABS_EXPR <D.1069> u>
1.18973149535723176508575932662800701619646905264169404553e+4932) ?
__builtin_frexpl (D.1069, &D.1070), D.1070 : 2147483647;
}
*y = __builtin_scalbnl (*f, 4);
}
The calls to __builtin_frexpl and __builtin_scalbnl eventually end
up as calls to frexpl and scalbnl, respectively.
I think you are correct that implements need to be added to c99_functions.c.
Messing with kinds.h doesn't fix this.