public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] fortran, libgfortran: Avoid using libquadmath for glibc 2.26+
@ 2022-06-23 12:04 Jakub Jelinek
  2022-06-23 20:49 ` Harald Anlauf
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2022-06-23 12:04 UTC (permalink / raw)
  To: gcc-patches, fortran; +Cc: Joseph S. Myers

Hi!

As mentioned by Joseph in PR105101, glibc 2.26 or later has on x86
(both -m32/-m64), powerpc64le, ia64 and mips support for
*f128 math/complex APIs plus strtof128 and strfromf128, and these APIs allow
us to avoid libquadmath for Fortran purposes on these architectures,
replace *q math/complex APIs, strtof128 instead of strtoflt128 and,
while strfromf128 unfortunately isn't a perfect replacement to
quadmath_snprintf, it can be made to work.

The advantage of this is that when configured against such glibcs
(2.26 is now almost 5 years old), we can avoid linking against an extra shared
library and the math support in glibc is maintained better than libquadmath.

We need both a compiler change (so that for glibc 2.26+ it uses *f128 APIs
instead of *q) and library change.

The above mentioned problem with strfromf128 is that the strfrom* functions
are severely restricted versions of snprintf.  In libgfortran, we handle
!isfinite differently and just use snprintf/quadmath_snprintf for
%+-#.*{L,Q}{f,e} printing.
strfrom* doesn't allow +, -, # modifiers and it only supports .34 or
similar precision, not .* .  The L/Q etc. letters are omitted.
The + is there to force + sign at the start if it is positive.
Workaround in the patch is to add the + at the start manually for
!signbit (val).
The - (left alignment instead of right) I don't understand why we need it,
when minimum field width isn't specified (for strfrom* can't be specified),
no padding is ever added anywhere I believe.
The # is to force adding . - workaround is to search for first . or e or '\0'
character, if it is '\0', just append ., if it is e, insert . before e and
memmove the rest (which is just a few bytes, e, +/- and at most a few digits)
one byte later.
The .* case is handled by creating the format string for strfrom* by
snprintf into a temporary buffer.

So far lightly tested on x86_64-linux with glibc 2.35 (removed libgfortran
dirs, rebuilt stage3 f951 and make all-target-libgfortran + make
check-gfortran), ok for trunk if it passes full testing?

On powerpc64le-linux, guess we'll need to test 3 configurations, glibc < 2.26,
glibc 2.26 to 2.31 and glibc 2.32 and later.

2022-06-23  Jakub Jelinek  <jakub@redhat.com>

gcc/fortran/
	* gfortran.h (gfc_real_inf0: Add c__Float128 bitfield.
	* trans-types.h (gfc_real16_is_float128): Update comment.
	(gfc_real16_is__Float128): Declare.
	* trans-types.cc (gfc_real16_is__Float128): Define.
	(gfc_init_kinds): When building powerpc64le-linux libgfortran
	on glibc 2.26 to 2.31, set gfc_real16_is__Float128 and
	c__Float128 instead of gfc_real16_is_float128 and c_float128.
	(gfc_build_real_type): Don't set c_long_double if c__Float128.
	Set gfc_real16_is__Float128 and c__Float128 instead of
	gfc_real16_is_float128 and c_float128 on glibc 2.26 or later.
	(gfc_init_types): Handle c__Float128 like c_float128.
	* trans-intrinsic.cc (builtin_decl_for_precision): Handle
	gfc_real16_is__Float128 like gfc_real16_is_float128.
	(gfc_builtin_decl_for_float_kind): Handle c__Float128 like c_float128.
	(gfc_build_intrinsic_lib_fndecls): For gfc_real16_is__Float128
	use *f128 APIs rather than *q APIs used for gfc_real16_is_float128.
	(gfc_get_intrinsic_lib_fndecl): Likewise.
	* trans-expr.cc (gfc_conv_power_op): Handle gfc_real16_is__Float128
	like gfc_real16_is_float128.
libgfortran/
	* configure.ac: Check for strtof128 and strfromf128.
	Check for math and complex *f128 functions.  Set
	have__Float128_libc_support to yes if *f128 support is around, for
	--enable-libquadmath-support default to no rather than yes if
	have__Float128_libc_support is yes.
	* acinclude.m4 (LIBGFOR_CHECK_FLOAT128): If libquadmath support
	isn't enabled and have__Float128_libc_support is yes, test
	_Float128/_Complex _Float128 support and define and subst
	HAVE__FLOAT128.
	* Makefile.am (kinds.h): Pass @HAVE__FLOAT128@ as an extra
	mk-kinds-h.sh argument.
	* mk-kinds-h.sh: Accept 4th have__float128 argument, if it is yes,
	use _Float128/_Complex _Float128 types insted of __float128 and
	_Complex float __attribute__((mode(TC))), use f128 suffix instead
	of q and define GFC_REAL_16_IS__FLOAT128 instead of
	GFC_REAL_16_IS_FLOAT128.
	* kinds-override.h: Add consistency check for GFC_REAL_16_IS__FLOAT128.
	* libgfortran.h (GFC_REAL_16_INFINITY, GFC_REAL_16_QUIET_NAN): Define
	for GFC_REAL_16_IS__FLOAT128.
	* caf/single.c (convert_type): Use _Float128/_Complex _Float128 for
	GFC_REAL_16_IS__FLOAT128.  For HAVE_GFC_REAL_10 when HAVE_GFC_REAL_16
	isn't defined use _Complex long double instead of long double.
	* ieee/issignaling_fallback.h (__issignalingf128): Handle
	GFC_REAL_16_IS__FLOAT128.
	(issignaling): Likewise.
	* ieee/ieee_helper.c: Handle GFC_REAL_16_IS__FLOAT128 like
	GFC_REAL_16_IS_FLOAT128.
	* intrinsics/cshift0.c (cshift0): Likewise.  Fix a comment typo,
	logn double -> long double.
	* intrinsics/erfc_scaled.c (_THRESH, _M_2_SQRTPI, _INF, _ERFC, _EXP):
	Handle GFC_REAL_16_IS_FLOAT128.
	* intrinsics/spread_generic.c (spread, spread_scalar): Handle
	GFC_REAL_16_IS__FLOAT128 like GFC_REAL_16_IS_FLOAT128.  Fix a comment
	typo, logn double -> long double.
	* intrinsics/trigd.c (GFC_REAL_16_IS_LONG_DOUBLE): Handle
	GFC_REAL_16_IS_LONG_DOUBLE.
	* intrinsics/pack_generic.c (pack): Handle GFC_REAL_16_IS__FLOAT128
	like GFC_REAL_16_IS_FLOAT128.  Fix a comment typo, logn double ->
	long double.
	* intrinsics/unpack_generic.c (unpack1, unpack0): Likewise.
	* runtime/in_pack_generic.c (internal_pack): Likewise.
	* runtime/in_unpack_generic.c (internal_unpack): Likewise.
	* io/read.c (convert_real, convert_infnan): Handle
	GFC_REAL_16_IS__FLOAT128.
	* io/transfer128.c: Enable also for GFC_REAL_16_IS__FLOAT128,
	but don't define tmp1 and tmp2 vars in that case.
	* io/write_float.def (gfor_strfromf128): New function.
	(DTOA2F128, FDTOA2F128): Define.
	(determine_en_precision, get_float_string): Handle
	GFC_REAL_16_IS__FLOAT128.
	* m4/mtype.m4: Likewise.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* generated/norm2_r16.c: Regenerated.
	* generated/bessel_r16.c: Regenerated.

--- gcc/fortran/gfortran.h.jj	2022-05-30 14:07:12.277196546 +0200
+++ gcc/fortran/gfortran.h	2022-06-23 11:34:55.550568362 +0200
@@ -2665,6 +2665,7 @@ typedef struct
   unsigned int c_double : 1;
   unsigned int c_long_double : 1;
   unsigned int c_float128 : 1;
+  unsigned int c__Float128 : 1;
 }
 gfc_real_info;
 
--- gcc/fortran/trans-types.h.jj	2022-01-18 11:58:59.579982099 +0100
+++ gcc/fortran/trans-types.h	2022-06-23 11:35:04.446450491 +0200
@@ -55,9 +55,12 @@ extern GTY(()) tree gfc_charlen_type_nod
 
 /* The following flags give us information on the correspondence of
    real (and complex) kinds with C floating-point types long double
-   and _Float128.  */
+   and _Float128 and using libquadmath APIs.  */
 extern bool gfc_real16_is_float128;
 
+/* Similarly, but using glibc *f128 APIs.  */
+extern bool gfc_real16_is__Float128;
+
 enum gfc_packed {
   PACKED_NO = 0,
   PACKED_PARTIAL,
--- gcc/fortran/trans-types.cc.jj	2022-05-16 11:14:57.587427707 +0200
+++ gcc/fortran/trans-types.cc	2022-06-23 11:55:15.194406144 +0200
@@ -72,6 +72,7 @@ tree gfc_float128_type_node = NULL_TREE;
 tree gfc_complex_float128_type_node = NULL_TREE;
 
 bool gfc_real16_is_float128 = false;
+bool gfc_real16_is__Float128 = false;
 
 static GTY(()) tree gfc_desc_dim_type;
 static GTY(()) tree gfc_max_array_element_size;
@@ -522,8 +523,16 @@ gfc_init_kinds (void)
 		&& (TARGET_GLIBC_MAJOR < 2
 		    || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR < 32)))
 	      {
-		gfc_real16_is_float128 = true;
-		gfc_real_kinds[i].c_float128 = 1;
+		if (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 26)
+		  {
+		    gfc_real16_is__Float128 = true;
+		    gfc_real_kinds[i].c__Float128 = 1;
+		  }
+		else
+		  {
+		    gfc_real16_is_float128 = true;
+		    gfc_real_kinds[i].c_float128 = 1;
+		  }
 	      }
 	  }
     }
@@ -871,13 +880,24 @@ gfc_build_real_type (gfc_real_info *info
     info->c_float = 1;
   if (mode_precision == DOUBLE_TYPE_SIZE)
     info->c_double = 1;
-  if (mode_precision == LONG_DOUBLE_TYPE_SIZE && !info->c_float128)
+  if (mode_precision == LONG_DOUBLE_TYPE_SIZE
+      && !info->c_float128
+      && !info->c__Float128)
     info->c_long_double = 1;
   if (mode_precision != LONG_DOUBLE_TYPE_SIZE && mode_precision == 128)
     {
       /* TODO: see PR101835.  */
-      info->c_float128 = 1;
-      gfc_real16_is_float128 = true;
+      if (TARGET_GLIBC_MAJOR > 2
+	  || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 26))
+	{
+	  info->c__Float128 = 1;
+	  gfc_real16_is__Float128 = true;
+	}
+      else
+	{
+	  info->c_float128 = 1;
+	  gfc_real16_is_float128 = true;
+	}
     }
 
   if (TYPE_PRECISION (float_type_node) == mode_precision)
@@ -981,7 +1001,8 @@ gfc_init_types (void)
 		gfc_real_kinds[index].kind);
       PUSH_TYPE (name_buf, type);
 
-      if (gfc_real_kinds[index].c_float128)
+      if (gfc_real_kinds[index].c_float128
+	  || gfc_real_kinds[index].c__Float128)
 	gfc_float128_type_node = type;
 
       type = gfc_build_complex_type (type);
@@ -990,7 +1011,8 @@ gfc_init_types (void)
 		gfc_real_kinds[index].kind);
       PUSH_TYPE (name_buf, type);
 
-      if (gfc_real_kinds[index].c_float128)
+      if (gfc_real_kinds[index].c_float128
+	  || gfc_real_kinds[index].c__Float128)
 	gfc_complex_float128_type_node = type;
     }
 
--- gcc/fortran/trans-intrinsic.cc.jj	2022-05-16 11:14:57.587427707 +0200
+++ gcc/fortran/trans-intrinsic.cc	2022-06-23 11:42:03.355899271 +0200
@@ -155,7 +155,7 @@ builtin_decl_for_precision (enum built_i
   else if (precision == TYPE_PRECISION (double_type_node))
     i = m->double_built_in;
   else if (precision == TYPE_PRECISION (long_double_type_node)
-	   && (!gfc_real16_is_float128
+	   && ((!gfc_real16_is_float128 & !gfc_real16_is__Float128)
 	       || long_double_type_node != gfc_float128_type_node))
     i = m->long_double_built_in;
   else if (precision == TYPE_PRECISION (gfc_float128_type_node))
@@ -175,7 +175,7 @@ gfc_builtin_decl_for_float_kind (enum bu
 {
   int i = gfc_validate_kind (BT_REAL, kind, false);
 
-  if (gfc_real_kinds[i].c_float128)
+  if (gfc_real_kinds[i].c_float128 || gfc_real_kinds[i].c__Float128)
     {
       /* For _Float128, the story is a bit different, because we return
 	 a decl to a library function rather than a built-in.  */
@@ -688,7 +688,7 @@ gfc_build_intrinsic_lib_fndecls (void)
   gfc_intrinsic_map_t *m;
   tree quad_decls[END_BUILTINS + 1];
 
-  if (gfc_real16_is_float128)
+  if (gfc_real16_is_float128 || gfc_real16_is__Float128)
   {
     /* If we have soft-float types, we create the decls for their
        C99-like library functions.  For now, we only handle _Float128
@@ -739,7 +739,10 @@ gfc_build_intrinsic_lib_fndecls (void)
        builtin_decl_for_float_type(). The others are all constructed by
        gfc_get_intrinsic_lib_fndecl().  */
 #define OTHER_BUILTIN(ID, NAME, TYPE, CONST) \
-  quad_decls[BUILT_IN_ ## ID] = define_quad_builtin (NAME "q", func_ ## TYPE, CONST);
+    quad_decls[BUILT_IN_ ## ID]						\
+      = define_quad_builtin (gfc_real16_is__Float128			\
+			     ? NAME "f128" : NAME "q", func_ ## TYPE,	\
+			     CONST);
 
 #include "mathbuiltins.def"
 
@@ -751,8 +754,9 @@ gfc_build_intrinsic_lib_fndecls (void)
     /* There is one built-in we defined manually, because it gets called
        with builtin_decl_for_precision() or builtin_decl_for_float_type()
        even though it is not an OTHER_BUILTIN: it is SQRT.  */
-    quad_decls[BUILT_IN_SQRT] = define_quad_builtin ("sqrtq", func_1, true);
-
+    quad_decls[BUILT_IN_SQRT]
+      = define_quad_builtin (gfc_real16_is__Float128
+			     ? "sqrtf128" : "sqrtq", func_1, true);
   }
 
   /* Add GCC builtin functions.  */
@@ -775,7 +779,7 @@ gfc_build_intrinsic_lib_fndecls (void)
 	m->complex10_decl
 	  = builtin_decl_explicit (m->complex_long_double_built_in);
 
-      if (!gfc_real16_is_float128)
+      if (!gfc_real16_is_float128 && !gfc_real16_is__Float128)
 	{
 	  if (m->long_double_built_in != END_BUILTINS)
 	    m->real16_decl = builtin_decl_explicit (m->long_double_built_in);
@@ -876,6 +880,9 @@ gfc_get_intrinsic_lib_fndecl (gfc_intrin
       else if (gfc_real_kinds[n].c_float128)
 	snprintf (name, sizeof (name), "%s%s%s",
 		  ts->type == BT_COMPLEX ? "c" : "", m->name, "q");
+      else if (gfc_real_kinds[n].c__Float128)
+	snprintf (name, sizeof (name), "%s%s%s",
+		  ts->type == BT_COMPLEX ? "c" : "", m->name, "f128");
       else
 	gcc_unreachable ();
     }
--- gcc/fortran/trans-expr.cc.jj	2022-04-23 10:10:51.146097072 +0200
+++ gcc/fortran/trans-expr.cc	2022-06-23 11:49:31.191964727 +0200
@@ -3582,7 +3582,7 @@ gfc_conv_power_op (gfc_se * se, gfc_expr
 		case 3:
 		  /* Use the __builtin_powil() only if real(kind=16) is
 		     actually the C long double type.  */
-		  if (!gfc_real16_is_float128)
+		  if (!gfc_real16_is_float128 & !gfc_real16_is__Float128)
 		    fndecl = builtin_decl_explicit (BUILT_IN_POWIL);
 		  break;
 
--- libgfortran/configure.ac.jj	2022-01-11 23:45:58.230109340 +0100
+++ libgfortran/configure.ac	2022-06-22 12:12:42.160032375 +0200
@@ -356,7 +356,7 @@ else
    getcwd localtime_r gmtime_r getpwuid_r ttyname_r clock_gettime \
    getgid getpid getuid geteuid umask getegid \
    secure_getenv __secure_getenv mkostemp strnlen strndup newlocale \
-   freelocale uselocale strerror_l)
+   freelocale uselocale strerror_l strtof128 strfromf128)
 fi
 
 # Check strerror_r, cannot be above as versions with two and three arguments exist
@@ -582,18 +582,92 @@ GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK2(
 GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK1([fabs], [double])
 GCC_CHECK_MATH_INLINE_BUILTIN_FALLBACK1([fabsl], [long double])
 
+GCC_CHECK_MATH_FUNC([acosf128])
+GCC_CHECK_MATH_FUNC([acoshf128])
+GCC_CHECK_MATH_FUNC([asinf128])
+GCC_CHECK_MATH_FUNC([asinhf128])
+GCC_CHECK_MATH_FUNC([atan2f128])
+GCC_CHECK_MATH_FUNC([atanf128])
+GCC_CHECK_MATH_FUNC([atanhf128])
+GCC_CHECK_MATH_FUNC([cargf128])
+GCC_CHECK_MATH_FUNC([ceilf128])
+GCC_CHECK_MATH_FUNC([copysignf128])
+GCC_CHECK_MATH_FUNC([cosf128])
+GCC_CHECK_MATH_FUNC([ccosf128])
+GCC_CHECK_MATH_FUNC([coshf128])
+GCC_CHECK_MATH_FUNC([ccoshf128])
+GCC_CHECK_MATH_FUNC([expf128])
+GCC_CHECK_MATH_FUNC([cexpf128])
+GCC_CHECK_MATH_FUNC([fabsf128])
+GCC_CHECK_MATH_FUNC([cabsf128])
+GCC_CHECK_MATH_FUNC([floorf128])
+GCC_CHECK_MATH_FUNC([fmaf128])
+GCC_CHECK_MATH_FUNC([fmodf128])
+GCC_CHECK_MATH_FUNC([frexpf128])
+GCC_CHECK_MATH_FUNC([hypotf128])
+GCC_CHECK_MATH_FUNC([ldexpf128])
+GCC_CHECK_MATH_FUNC([logf128])
+GCC_CHECK_MATH_FUNC([clogf128])
+GCC_CHECK_MATH_FUNC([log10f128])
+GCC_CHECK_MATH_FUNC([clog10f128])
+GCC_CHECK_MATH_FUNC([nextafterf128])
+GCC_CHECK_MATH_FUNC([powf128])
+GCC_CHECK_MATH_FUNC([cpowf128])
+GCC_CHECK_MATH_FUNC([roundf128])
+GCC_CHECK_MATH_FUNC([lroundf128])
+GCC_CHECK_MATH_FUNC([llroundf128])
+GCC_CHECK_MATH_FUNC([scalbnf128])
+GCC_CHECK_MATH_FUNC([sinf128])
+GCC_CHECK_MATH_FUNC([csinf128])
+GCC_CHECK_MATH_FUNC([sinhf128])
+GCC_CHECK_MATH_FUNC([csinhf128])
+GCC_CHECK_MATH_FUNC([sqrtf128])
+GCC_CHECK_MATH_FUNC([csqrtf128])
+GCC_CHECK_MATH_FUNC([tanf128])
+GCC_CHECK_MATH_FUNC([ctanf128])
+GCC_CHECK_MATH_FUNC([tanhf128])
+GCC_CHECK_MATH_FUNC([ctanhf128])
+GCC_CHECK_MATH_FUNC([truncf128])
+GCC_CHECK_MATH_FUNC([erff128])
+GCC_CHECK_MATH_FUNC([erfcf128])
+GCC_CHECK_MATH_FUNC([j0f128])
+GCC_CHECK_MATH_FUNC([j1f128])
+GCC_CHECK_MATH_FUNC([jnf128])
+GCC_CHECK_MATH_FUNC([y0f128])
+GCC_CHECK_MATH_FUNC([y1f128])
+GCC_CHECK_MATH_FUNC([ynf128])
+GCC_CHECK_MATH_FUNC([tgammaf128])
+GCC_CHECK_MATH_FUNC([lgammaf128])
+
+GCC_CHECK_MATH_FUNC([cacosf128])
+GCC_CHECK_MATH_FUNC([cacoshf128])
+GCC_CHECK_MATH_FUNC([casinf128])
+GCC_CHECK_MATH_FUNC([casinhf128])
+GCC_CHECK_MATH_FUNC([catanf128])
+GCC_CHECK_MATH_FUNC([catanhf128])
+
 # Check whether the system has a working stat()
 LIBGFOR_CHECK_WORKING_STAT
 
 # Check whether __mingw_snprintf() is present
 LIBGFOR_CHECK_MINGW_SNPRINTF
 
+have__Float128_libc_support=no
+if test "x$ac_cv_func_strtof128$ac_cv_func_strfromf128" = xyesyes \
+   && test "x$gcc_cv_math_func_sinf128$gcc_cv_math_func_cacosf128" = xyesyes; then
+  have__Float128_libc_support=yes
+fi
+
 # Check whether libquadmath should be used
 AC_ARG_ENABLE(libquadmath-support,
 AS_HELP_STRING([--disable-libquadmath-support],
   [disable libquadmath support for Fortran]),
 ENABLE_LIBQUADMATH_SUPPORT=$enableval,
-ENABLE_LIBQUADMATH_SUPPORT=yes)
+if test "x$have__Float128_libc_support" = xyes; then
+  ENABLE_LIBQUADMATH_SUPPORT=no
+else
+  ENABLE_LIBQUADMATH_SUPPORT=yes
+fi)
 enable_libquadmath_support=
 if test "${ENABLE_LIBQUADMATH_SUPPORT}" = "no" ; then
   enable_libquadmath_support=no
--- libgfortran/acinclude.m4.jj	2022-01-11 23:40:33.935662686 +0100
+++ libgfortran/acinclude.m4	2022-06-22 12:35:18.200005055 +0200
@@ -264,6 +264,7 @@ __mingw_snprintf (NULL, 0, "%d\n", 1);
 dnl Check whether we have a __float128 type
 AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
   LIBQUADSPEC=
+  HAVE__FLOAT128=no
 
   if test "x$enable_libquadmath_support" != xno; then
 
@@ -355,6 +356,42 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
     fi
   fi
   else
+
+    if test "x$have__Float128_libc_support" = xyes; then
+      AC_CACHE_CHECK([whether we have a usable _Float128 type],
+		     libgfor_cv_have__Float128, [
+   GCC_TRY_COMPILE_OR_LINK([
+    _Float128 foo (_Float128 x)
+    {
+
+     _Complex _Float128 z1, z2;
+
+     z1 = x;
+     z2 = x / 7.F128;
+     z2 /= z1;
+
+     return (_Float128) z2;
+    }
+
+    _Float128 bar (_Float128 x)
+    {
+      return x * __builtin_huge_valf128 ();
+    }
+  ],[
+    foo (1.2F128);
+    bar (1.2F128);
+  ],[
+    libgfor_cv_have__Float128=yes
+  ],[
+    libgfor_cv_have__Float128=no
+])])
+
+      if test "x$libgfor_cv_have__Float128" = xyes; then
+	AC_DEFINE(HAVE__FLOAT128, 1, [Define if have a usable _Float128 type.])
+	HAVE__FLOAT128=yes
+      fi
+    fi
+
     # for --disable-quadmath
     LIBQUADLIB=
     LIBQUADLIB_DEP=
@@ -366,6 +403,7 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
   AC_SUBST(LIBQUADLIB)
   AC_SUBST(LIBQUADLIB_DEP)
   AC_SUBST(LIBQUADINCLUDE)
+  AC_SUBST(HAVE__FLOAT128)
 
   dnl We need a conditional for the Makefile
   AM_CONDITIONAL(LIBGFOR_BUILD_QUAD, [test "x$libgfor_cv_have_float128" = xyes])
--- libgfortran/Makefile.am.jj	2022-01-14 12:10:56.429770387 +0100
+++ libgfortran/Makefile.am	2022-06-22 12:49:18.835924603 +0200
@@ -1167,7 +1167,9 @@ I_M4_DEPS8=$(I_M4_DEPS) m4/ifindloc1.m4
 I_M4_DEPS9=$(I_M4_DEPS) m4/ifindloc2.m4
 
 kinds.h: $(srcdir)/mk-kinds-h.sh
-	$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
+	$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' \
+					 '@LIBGOMP_CHECKED_REAL_KINDS@' \
+					 '$(FCCOMPILE)' '@HAVE__FLOAT128@' > $@ || rm $@
 
 kinds.inc: kinds.h $(srcdir)/kinds-override.h
 	cat kinds.h $(srcdir)/kinds-override.h | grep '^#' | grep -v include > $@
--- libgfortran/mk-kinds-h.sh.jj	2022-01-17 13:37:39.763683227 +0100
+++ libgfortran/mk-kinds-h.sh	2022-06-22 12:38:47.606246183 +0200
@@ -2,8 +2,8 @@
 LC_ALL=C
 export LC_ALL
 
-if test "$#" -ne 3; then
-  echo "Usage $0 int_kinds real_kinds compile"
+if test "$#" -ne 4; then
+  echo "Usage $0 int_kinds real_kinds compile have__float128"
   exit 1
 fi
 
@@ -11,6 +11,7 @@ fi
 possible_integer_kinds="$1"
 possible_real_kinds="$2"
 compile="$3"
+have__float128="$4"
 
 largest=""
 smallest=""
@@ -49,7 +50,7 @@ echo ""
 
 
 # Get the kind value for long double, so we may disambiguate it
-# from __float128.
+# from __float128/_Float128.
 echo "use iso_c_binding; print *, c_long_double ; end" > tmq$$.f90
 long_double_kind=`$compile -S -fdump-parse-tree tmq$$.f90 | grep TRANSFER \
 			| sed 's/ *TRANSFER *//'`
@@ -68,10 +69,17 @@ for k in $possible_real_kinds; do
       10) ctype="long double" ; cplxtype="complex long double" ; suffix="l" ;;
       # If we have a REAL(KIND=16), it is either long double or __float128
       16) if [ $long_double_kind -ne 16 ]; then
-	    ctype="__float128"
-	    cplxtype="_Complex float __attribute__((mode(TC)))"
-	    suffix="q"
-	    echo "#define GFC_REAL_16_IS_FLOAT128"
+	    if [ x$have__float128 = xyes ]; then
+	      ctype="_Float128"
+	      cplxtype="_Complex _Float128"
+	      suffix="f128"
+	      echo "#define GFC_REAL_16_IS__FLOAT128"
+	    else
+	      ctype="__float128"
+	      cplxtype="_Complex float __attribute__((mode(TC)))"
+	      suffix="q"
+	      echo "#define GFC_REAL_16_IS_FLOAT128"
+	    fi
 	  else
 	    ctype="long double"
 	    cplxtype="complex long double"
--- libgfortran/kinds-override.h.jj	2022-01-11 23:45:58.233109298 +0100
+++ libgfortran/kinds-override.h	2022-06-22 12:40:05.170224299 +0200
@@ -28,6 +28,9 @@ see the files COPYING3 and COPYING.RUNTI
 #if defined(GFC_REAL_16_IS_FLOAT128) && !defined(HAVE_FLOAT128)
 # error "Where has __float128 gone?"
 #endif
+#if defined(GFC_REAL_16_IS__FLOAT128) && !defined(HAVE__FLOAT128)
+# error "Where has _Float128 gone?"
+#endif
 
 /* Keep these conditions on one line so grep can filter it out.  */
 #if defined(__powerpc64__)  && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__  && __SIZEOF_LONG_DOUBLE__ == 16
--- libgfortran/libgfortran.h.jj	2022-01-12 09:41:48.779107854 +0100
+++ libgfortran/libgfortran.h	2022-06-22 12:50:41.107837321 +0200
@@ -322,6 +322,8 @@ typedef GFC_UINTEGER_4 gfc_char4_t;
 # ifdef HAVE_GFC_REAL_16
 #  ifdef GFC_REAL_16_IS_LONG_DOUBLE
 #   define GFC_REAL_16_INFINITY __builtin_infl ()
+#  elif defined GFC_REAL_16_IS__FLOAT128
+#   define GFC_REAL_16_INFINITY __builtin_inff128 ()
 #  else
 #   define GFC_REAL_16_INFINITY __builtin_infq ()
 #  endif
@@ -343,6 +345,8 @@ typedef GFC_UINTEGER_4 gfc_char4_t;
 # ifdef HAVE_GFC_REAL_16
 #  ifdef GFC_REAL_16_IS_LONG_DOUBLE
 #   define GFC_REAL_16_QUIET_NAN __builtin_nanl ("")
+#  elif defined GFC_REAL_16_IS__FLOAT128
+#   define GFC_REAL_16_QUIET_NAN __builtin_nanf128 ("")
 #  else
 #   define GFC_REAL_16_QUIET_NAN nanq ("")
 #  endif
--- libgfortran/caf/single.c.jj	2022-01-11 23:11:23.815270129 +0100
+++ libgfortran/caf/single.c	2022-06-22 12:55:11.529263502 +0200
@@ -477,13 +477,16 @@ convert_type (void *dst, int dst_type, i
 #if defined(GFC_REAL_16_IS_LONG_DOUBLE)
   typedef long double real128t;
   typedef _Complex long double complex128t;
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+  typedef _Float128 real128t;
+  typedef _Complex _Float128 complex128t;
 #elif defined(HAVE_GFC_REAL_16)
   typedef _Complex float __attribute__((mode(TC))) __complex128;
   typedef __float128 real128t;
   typedef __complex128 complex128t;
 #elif defined(HAVE_GFC_REAL_10)
   typedef long double real128t;
-  typedef long double complex128t;
+  typedef _Complex long double complex128t;
 #else
   typedef double real128t;
   typedef _Complex double complex128t;
--- libgfortran/ieee/issignaling_fallback.h.jj	2022-02-04 14:36:56.536583916 +0100
+++ libgfortran/ieee/issignaling_fallback.h	2022-06-22 13:00:14.657257457 +0200
@@ -195,13 +195,17 @@ __issignalingl (long double x)
 #endif
 
 
-#if defined(GFC_REAL_16_IS_FLOAT128)
+#if defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128)
 
-/* We have a __float128 type.  */
+/* We have a __float128 or _Float128 type.  */
 
 typedef union
 {
+#ifdef GFC_REAL_16_IS_FLOAT128
   __float128 value;
+#else
+  _Float128 value;
+#endif
   struct
   {
 #if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
@@ -215,7 +219,11 @@ typedef union
 } ieee854_float128_shape_type;
 
 static inline int
+#ifdef GFC_REAL_16_IS_FLOAT128
 __issignalingf128 (__float128 x)
+#else
+__issignalingf128 (_Float128 x)
+#endif
 {
   uint64_t hxi, lxi;
   ieee854_float128_shape_type u;
@@ -241,6 +249,13 @@ __issignalingf128 (__float128 x)
 	    float: __issignalingf, \
 	    double: __issignaling, \
 	    long double: __issignalingl)(X)
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+# define issignaling(X) \
+  _Generic ((X), \
+	    _Float128: __issignalingf128, \
+	    float: __issignalingf, \
+	    double: __issignaling, \
+	    long double: __issignalingl)(X)
 #else
 # define issignaling(X) \
   _Generic ((X), \
--- libgfortran/ieee/ieee_helper.c.jj	2022-02-04 14:36:56.536583916 +0100
+++ libgfortran/ieee/ieee_helper.c	2022-06-22 12:57:38.676318840 +0200
@@ -181,7 +181,7 @@ VALUEMACRO(10, l)
 #endif
 
 #ifdef HAVE_GFC_REAL_16
-# ifdef GFC_REAL_16_IS_FLOAT128
+# if defined (GFC_REAL_16_IS_FLOAT128) || defined (GFC_REAL_16_IS__FLOAT128)
 VALUEMACRO(16, f128)
 # else
 VALUEMACRO(16, l)
--- libgfortran/intrinsics/cshift0.c.jj	2022-01-11 23:11:23.856269553 +0100
+++ libgfortran/intrinsics/cshift0.c	2022-06-22 13:02:03.549818352 +0200
@@ -132,10 +132,10 @@ cshift0 (gfc_array_char * ret, const gfc
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_REAL_10
     case GFC_DTYPE_REAL_10:
       cshift0_r10 ((gfc_array_r10 *)ret, (gfc_array_r10 *) array, shift,
@@ -162,10 +162,10 @@ cshift0 (gfc_array_char * ret, const gfc
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       cshift0_c10 ((gfc_array_c10 *)ret, (gfc_array_c10 *) array, shift,
--- libgfortran/intrinsics/erfc_scaled.c.jj	2022-01-11 23:49:50.119853428 +0100
+++ libgfortran/intrinsics/erfc_scaled.c	2022-06-22 13:03:36.998583350 +0200
@@ -58,6 +58,14 @@ see the files COPYING3 and COPYING.RUNTI
 # define _ERFC(x) erfcq(x)
 # define _EXP(x) expq(x)
 
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+
+# define _THRESH -106.566990228185312813205074546585730F128
+# define _M_2_SQRTPI M_2_SQRTPIf128
+# define _INF __builtin_inff128()
+# define _ERFC(x) erfcf128(x)
+# define _EXP(x) expf128(x)
+
 #else
 
 # define _THRESH -106.566990228185312813205074546585730L
--- libgfortran/intrinsics/spread_generic.c.jj	2022-01-11 23:11:23.860269497 +0100
+++ libgfortran/intrinsics/spread_generic.c	2022-06-22 13:10:36.933063544 +0200
@@ -320,10 +320,10 @@ spread (gfc_array_char *ret, const gfc_a
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef GFC_HAVE_REAL_10
     case GFC_DTYPE_REAL_10:
       spread_r10 ((gfc_array_r10 *) ret, (gfc_array_r10 *) source,
@@ -352,10 +352,10 @@ spread (gfc_array_char *ret, const gfc_a
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef GFC_HAVE_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       spread_c10 ((gfc_array_c10 *) ret, (gfc_array_c10 *) source,
@@ -524,10 +524,10 @@ spread_scalar (gfc_array_char *ret, cons
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_REAL_10
     case GFC_DTYPE_REAL_10:
       spread_scalar_r10 ((gfc_array_r10 *) ret, (GFC_REAL_10 *) source,
@@ -556,10 +556,10 @@ spread_scalar (gfc_array_char *ret, cons
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       spread_scalar_c10 ((gfc_array_c10 *) ret, (GFC_COMPLEX_10 *) source,
--- libgfortran/intrinsics/trigd.c.jj	2022-01-11 23:49:51.737830710 +0100
+++ libgfortran/intrinsics/trigd.c	2022-06-22 13:12:47.019354915 +0200
@@ -261,6 +261,24 @@ see the files COPYING3 and COPYING.RUNTI
 
 #endif /* HAVE_FABSL && HAVE_FMODL && HAVE_COPYSIGNL */
 
+#elif defined(GFC_REAL_16_IS_LONG_DOUBLE)
+
+#if defined(HAVE_FABSF128) && defined(HAVE_FMODF128) && defined(HAVE_COPYSIGNF128)
+
+#ifdef HAVE_SINF128
+#define ENABLE_SIND
+#endif
+
+#ifdef HAVE_COSF128
+#define ENABLE_COSD
+#endif
+
+#ifdef HAVE_TANF128
+#define ENABLE_TAND
+#endif
+
+#endif /* HAVE_FABSF128 && HAVE_FMODF128 && HAVE_COPYSIGNF128 */
+
 #else
 
 /* libquadmath: HAVE_*Q are never defined.  They must be available.  */
--- libgfortran/intrinsics/pack_generic.c.jj	2022-01-11 23:11:23.859269511 +0100
+++ libgfortran/intrinsics/pack_generic.c	2022-06-22 13:05:56.324749208 +0200
@@ -307,10 +307,10 @@ pack (gfc_array_char *ret, const gfc_arr
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_REAL_10
     case GFC_DTYPE_REAL_10:
       pack_r10 ((gfc_array_r10 *) ret, (gfc_array_r10 *) array,
@@ -339,10 +339,10 @@ pack (gfc_array_char *ret, const gfc_arr
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       pack_c10 ((gfc_array_c10 *) ret, (gfc_array_c10 *) array,
--- libgfortran/intrinsics/unpack_generic.c.jj	2022-01-11 23:11:23.860269497 +0100
+++ libgfortran/intrinsics/unpack_generic.c	2022-06-22 13:14:18.896148161 +0200
@@ -265,10 +265,10 @@ unpack1 (gfc_array_char *ret, const gfc_
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_REAL_10
     case GFC_DTYPE_REAL_10:
       unpack1_r10 ((gfc_array_r10 *) ret, (gfc_array_r10 *) vector,
@@ -297,10 +297,10 @@ unpack1 (gfc_array_char *ret, const gfc_
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       unpack1_c10 ((gfc_array_c10 *) ret, (gfc_array_c10 *) vector,
@@ -486,10 +486,10 @@ unpack0 (gfc_array_char *ret, const gfc_
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_REAL_10
     case GFC_DTYPE_REAL_10:
       unpack0_r10 ((gfc_array_r10 *) ret, (gfc_array_r10 *) vector,
@@ -518,10 +518,10 @@ unpack0 (gfc_array_char *ret, const gfc_
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # ifdef HAVE_GFC_COMPLEX_10
     case GFC_DTYPE_COMPLEX_10:
       unpack0_c10 ((gfc_array_c10 *) ret, (gfc_array_c10 *) vector,
--- libgfortran/runtime/in_pack_generic.c.jj	2022-01-11 23:11:23.883269174 +0100
+++ libgfortran/runtime/in_pack_generic.c	2022-06-22 14:14:43.239670210 +0200
@@ -82,10 +82,10 @@ internal_pack (gfc_array_char * source)
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # if defined (HAVE_GFC_REAL_10)
     case GFC_DTYPE_REAL_10:
       return internal_pack_r10 ((gfc_array_r10 *) source);
@@ -106,10 +106,10 @@ internal_pack (gfc_array_char * source)
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # if defined (HAVE_GFC_COMPLEX_10)
     case GFC_DTYPE_COMPLEX_10:
       return internal_pack_c10 ((gfc_array_c10 *) source);
--- libgfortran/runtime/in_unpack_generic.c.jj	2022-01-11 23:11:23.883269174 +0100
+++ libgfortran/runtime/in_unpack_generic.c	2022-06-22 14:15:12.485283638 +0200
@@ -89,10 +89,10 @@ internal_unpack (gfc_array_char * d, con
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # if defined(HAVE_GFC_REAL_10)
     case GFC_DTYPE_REAL_10:
       internal_unpack_r10 ((gfc_array_r10 *) d, (const GFC_REAL_10 *) s);
@@ -117,10 +117,10 @@ internal_unpack (gfc_array_char * d, con
 /* FIXME: This here is a hack, which will have to be removed when
    the array descriptor is reworked.  Currently, we don't store the
    kind value for the type, but only the size.  Because on targets with
-   __float128, we have sizeof(logn double) == sizeof(__float128),
+   __float128, we have sizeof(long double) == sizeof(__float128),
    we cannot discriminate here and have to fall back to the generic
    handling (which is suboptimal).  */
-#if !defined(GFC_REAL_16_IS_FLOAT128)
+#if !defined(GFC_REAL_16_IS_FLOAT128) && !defined(GFC_REAL_16_IS__FLOAT128)
 # if defined(HAVE_GFC_COMPLEX_10)
     case GFC_DTYPE_COMPLEX_10:
       internal_unpack_c10 ((gfc_array_c10 *) d, (const GFC_COMPLEX_10 *) s);
--- libgfortran/io/read.c.jj	2022-01-11 23:49:49.597860757 +0100
+++ libgfortran/io/read.c	2022-06-22 14:13:35.351567588 +0200
@@ -188,6 +188,10 @@ convert_real (st_parameter_dt *dtp, void
     case 16:
       *((GFC_REAL_16*) dest) = __qmath_(strtoflt128) (buffer, &endptr);
       break;
+# elif defined(GFC_REAL_16_IS__FLOAT128)
+    case 16:
+      *((GFC_REAL_16*) dest) = strtof128 (buffer, &endptr);
+      break;
 # elif defined(HAVE_STRTOLD)
     case 16:
       *((GFC_REAL_16*) dest) = gfc_strtold (buffer, &endptr);
@@ -274,6 +278,13 @@ convert_infnan (st_parameter_dt *dtp, vo
     case 16:
       *((GFC_REAL_16*) dest) = __qmath_(strtoflt128) (buffer, NULL);
       break;
+# elif defined(GFC_REAL_16_IS__FLOAT128)
+    case 16:
+      if (is_inf)
+	*((GFC_REAL_16*) dest) = plus ? __builtin_inff128 () : -__builtin_inff128 ();
+      else
+	*((GFC_REAL_16*) dest) = plus ? __builtin_nanf128 ("") : -__builtin_nanf128 ("");
+      break;
 # else
     case 16:
       if (is_inf)
--- libgfortran/io/transfer128.c.jj	2022-01-11 23:49:48.624874419 +0100
+++ libgfortran/io/transfer128.c	2022-06-22 13:20:31.657252114 +0200
@@ -28,7 +28,8 @@ see the files COPYING3 and COPYING.RUNTI
 #include "io.h"
 
 
-#if defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_GFC_REAL_17)
+#if defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) \
+    || defined(HAVE_GFC_REAL_17)
 
 /* The prototypes for the called procedures in transfer.c.  */
 
@@ -65,9 +66,11 @@ export_proto(transfer_complex128_write);
    write_float; the pointer assignment with USED attribute make sure
    that there is a non-weakref dependence if the quadmath functions
    are used. That avoids segfault when libquadmath is statically linked.  */
-# if !defined(HAVE_GFC_REAL_17) || !defined(POWER_IEEE128)
+# ifndef GFC_REAL_16_IS__FLOAT128
+#  if !defined(HAVE_GFC_REAL_17) || !defined(POWER_IEEE128)
 static void __attribute__((used)) *tmp1 = strtoflt128;
 static void __attribute__((used)) *tmp2 = quadmath_snprintf;
+#  endif
 # endif
 
 void
--- libgfortran/io/write_float.def.jj	2022-01-11 23:49:49.130867314 +0100
+++ libgfortran/io/write_float.def	2022-06-22 19:30:15.403155935 +0200
@@ -837,6 +837,42 @@ snprintf (buffer, size, "%+-#.*e", (prec
 #define DTOA2L(prec,val) \
 snprintf (buffer, size, "%+-#.*Le", (prec), (val))
 
+#ifdef GFC_REAL_16_IS__FLOAT128
+/* strfromf128 unfortunately doesn't allow +, - and # modifiers
+   nor .* (only allows .number).  For +, work around it by adding
+   leading + manually for !signbit values.  For - I don't see why
+   we need it, when we don't specify field minimum width.
+   For #, add . if it is missing.  Assume size is at least 2.  */
+static int
+gfor_strfromf128 (char *buffer, size_t size, int kind, int prec, _Float128 val)
+{
+  int ret, n = 0;
+  char fmt[sizeof (int) * 3 + 5];
+  snprintf (fmt, sizeof fmt, "%%.%d%c", prec, kind);
+  if (!__builtin_signbit (val))
+    {
+      n = 1;
+      buffer[0] = '+';
+    }
+  ret = strfromf128 (buffer + n, size - n, fmt, val) + n;
+  if ((size_t) ret < size - 1)
+    {
+      size_t s = strcspn (buffer, ".e");
+      if (buffer[s] != '.')
+	{
+	  if (buffer[s] == '\0')
+	    buffer[s + 1] = '\0';
+	  else
+	    memmove (buffer + s + 1, buffer + s, ret + 1 - s);
+	  buffer[s] = '.';
+	  ++ret;
+	}
+    }
+  return ret;
+}
+# define DTOA2F128(prec,val) \
+gfor_strfromf128 (buffer, size, 'e', (prec), (val))
+#endif
 
 #if defined(HAVE_GFC_REAL_17)
 # if defined(POWER_IEEE128)
@@ -860,6 +896,10 @@ snprintf (buffer, size, "%+-#.*f", (prec
 #define FDTOA2L(prec,val) \
 snprintf (buffer, size, "%+-#.*Lf", (prec), (val))
 
+#ifdef GFC_REAL_16_IS__FLOAT128
+# define FDTOA2F128(prec,val) \
+gfor_strfromf128 (buffer, size, 'f', (prec), (val))
+#endif
 
 #if defined(HAVE_GFC_REAL_17)
 # if defined(POWER_IEEE128)
@@ -939,6 +979,8 @@ determine_en_precision (st_parameter_dt
     case 16:
 # ifdef GFC_REAL_16_IS_FLOAT128
       EN_PREC(16,Q)
+# elif defined(GFC_REAL_16_IS__FLOAT128)
+      EN_PREC(16,F128)
 # else
       EN_PREC(16,L)
 # endif
@@ -1147,6 +1189,8 @@ get_float_string (st_parameter_dt *dtp,
     case 16:
 # ifdef GFC_REAL_16_IS_FLOAT128
       FORMAT_FLOAT(16,Q)
+# elif defined(GFC_REAL_16_IS__FLOAT128)
+      FORMAT_FLOAT(16,F128)
 # else
       FORMAT_FLOAT(16,L)
 # endif
--- libgfortran/m4/mtype.m4.jj	2022-01-11 23:35:52.584615001 +0100
+++ libgfortran/m4/mtype.m4	2022-06-22 13:52:56.987824469 +0200
@@ -9,7 +9,7 @@ define(hasmathfunc,dnl
 `ifelse(kind,4,`defined (HAVE_'upcase($1)`F)',dnl
 ifelse(kind,8,`defined (HAVE_'upcase($1)`)',dnl
 ifelse(kind,10,`defined (HAVE_'upcase($1)`L)',dnl
-ifelse(kind,16,`(defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_'upcase($1)`L))',dnl
+ifelse(kind,16,`(defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) || defined(HAVE_'upcase($1)`L))',dnl
 ifelse(kind,17,`1 /* FIXME: figure this out later.  */',dnl
 `error out')))))')
 define(mathfunc_macro,`ifelse(kind,17,dnl
@@ -21,6 +21,8 @@ define(mathfunc_macro,`ifelse(kind,17,dn
 `ifelse(kind,16,dnl
 `#if defined(GFC_REAL_16_IS_FLOAT128)
 #define MATHFUNC(funcname) funcname ## q
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+#define MATHFUNC(funcname) funcname ## f128
 #else
 #define MATHFUNC(funcname) funcname ## l
 #endif',dnl
--- libgfortran/config.h.in.jj	2022-01-11 23:45:58.226109396 +0100
+++ libgfortran/config.h.in	2022-06-22 12:20:10.153059959 +0200
@@ -12,12 +12,18 @@
 /* Define to 1 if you have the `acosf' function. */
 #undef HAVE_ACOSF
 
+/* Define to 1 if you have the `acosf128' function. */
+#undef HAVE_ACOSF128
+
 /* Define to 1 if you have the `acosh' function. */
 #undef HAVE_ACOSH
 
 /* Define to 1 if you have the `acoshf' function. */
 #undef HAVE_ACOSHF
 
+/* Define to 1 if you have the `acoshf128' function. */
+#undef HAVE_ACOSHF128
+
 /* Define to 1 if you have the `acoshl' function. */
 #undef HAVE_ACOSHL
 
@@ -33,12 +39,18 @@
 /* Define to 1 if you have the `asinf' function. */
 #undef HAVE_ASINF
 
+/* Define to 1 if you have the `asinf128' function. */
+#undef HAVE_ASINF128
+
 /* Define to 1 if you have the `asinh' function. */
 #undef HAVE_ASINH
 
 /* Define to 1 if you have the `asinhf' function. */
 #undef HAVE_ASINHF
 
+/* Define to 1 if you have the `asinhf128' function. */
+#undef HAVE_ASINHF128
+
 /* Define to 1 if you have the `asinhl' function. */
 #undef HAVE_ASINHL
 
@@ -54,18 +66,27 @@
 /* Define to 1 if you have the `atan2f' function. */
 #undef HAVE_ATAN2F
 
+/* Define to 1 if you have the `atan2f128' function. */
+#undef HAVE_ATAN2F128
+
 /* Define to 1 if you have the `atan2l' function. */
 #undef HAVE_ATAN2L
 
 /* Define to 1 if you have the `atanf' function. */
 #undef HAVE_ATANF
 
+/* Define to 1 if you have the `atanf128' function. */
+#undef HAVE_ATANF128
+
 /* Define to 1 if you have the `atanh' function. */
 #undef HAVE_ATANH
 
 /* Define to 1 if you have the `atanhf' function. */
 #undef HAVE_ATANHF
 
+/* Define to 1 if you have the `atanhf128' function. */
+#undef HAVE_ATANHF128
+
 /* Define to 1 if you have the `atanhl' function. */
 #undef HAVE_ATANHL
 
@@ -99,6 +120,9 @@
 /* Define to 1 if you have the `cabsf' function. */
 #undef HAVE_CABSF
 
+/* Define to 1 if you have the `cabsf128' function. */
+#undef HAVE_CABSF128
+
 /* Define to 1 if you have the `cabsl' function. */
 #undef HAVE_CABSL
 
@@ -108,12 +132,18 @@
 /* Define to 1 if you have the `cacosf' function. */
 #undef HAVE_CACOSF
 
+/* Define to 1 if you have the `cacosf128' function. */
+#undef HAVE_CACOSF128
+
 /* Define to 1 if you have the `cacosh' function. */
 #undef HAVE_CACOSH
 
 /* Define to 1 if you have the `cacoshf' function. */
 #undef HAVE_CACOSHF
 
+/* Define to 1 if you have the `cacoshf128' function. */
+#undef HAVE_CACOSHF128
+
 /* Define to 1 if you have the `cacoshl' function. */
 #undef HAVE_CACOSHL
 
@@ -126,6 +156,9 @@
 /* Define to 1 if you have the `cargf' function. */
 #undef HAVE_CARGF
 
+/* Define to 1 if you have the `cargf128' function. */
+#undef HAVE_CARGF128
+
 /* Define to 1 if you have the `cargl' function. */
 #undef HAVE_CARGL
 
@@ -135,12 +168,18 @@
 /* Define to 1 if you have the `casinf' function. */
 #undef HAVE_CASINF
 
+/* Define to 1 if you have the `casinf128' function. */
+#undef HAVE_CASINF128
+
 /* Define to 1 if you have the `casinh' function. */
 #undef HAVE_CASINH
 
 /* Define to 1 if you have the `casinhf' function. */
 #undef HAVE_CASINHF
 
+/* Define to 1 if you have the `casinhf128' function. */
+#undef HAVE_CASINHF128
+
 /* Define to 1 if you have the `casinhl' function. */
 #undef HAVE_CASINHL
 
@@ -153,12 +192,18 @@
 /* Define to 1 if you have the `catanf' function. */
 #undef HAVE_CATANF
 
+/* Define to 1 if you have the `catanf128' function. */
+#undef HAVE_CATANF128
+
 /* Define to 1 if you have the `catanh' function. */
 #undef HAVE_CATANH
 
 /* Define to 1 if you have the `catanhf' function. */
 #undef HAVE_CATANHF
 
+/* Define to 1 if you have the `catanhf128' function. */
+#undef HAVE_CATANHF128
+
 /* Define to 1 if you have the `catanhl' function. */
 #undef HAVE_CATANHL
 
@@ -171,12 +216,18 @@
 /* Define to 1 if you have the `ccosf' function. */
 #undef HAVE_CCOSF
 
+/* Define to 1 if you have the `ccosf128' function. */
+#undef HAVE_CCOSF128
+
 /* Define to 1 if you have the `ccosh' function. */
 #undef HAVE_CCOSH
 
 /* Define to 1 if you have the `ccoshf' function. */
 #undef HAVE_CCOSHF
 
+/* Define to 1 if you have the `ccoshf128' function. */
+#undef HAVE_CCOSHF128
+
 /* Define to 1 if you have the `ccoshl' function. */
 #undef HAVE_CCOSHL
 
@@ -189,6 +240,9 @@
 /* Define to 1 if you have the `ceilf' function. */
 #undef HAVE_CEILF
 
+/* Define to 1 if you have the `ceilf128' function. */
+#undef HAVE_CEILF128
+
 /* Define to 1 if you have the `ceill' function. */
 #undef HAVE_CEILL
 
@@ -198,6 +252,9 @@
 /* Define to 1 if you have the `cexpf' function. */
 #undef HAVE_CEXPF
 
+/* Define to 1 if you have the `cexpf128' function. */
+#undef HAVE_CEXPF128
+
 /* Define to 1 if you have the `cexpl' function. */
 #undef HAVE_CEXPL
 
@@ -222,12 +279,18 @@
 /* Define to 1 if you have the `clog10f' function. */
 #undef HAVE_CLOG10F
 
+/* Define to 1 if you have the `clog10f128' function. */
+#undef HAVE_CLOG10F128
+
 /* Define to 1 if you have the `clog10l' function. */
 #undef HAVE_CLOG10L
 
 /* Define to 1 if you have the `clogf' function. */
 #undef HAVE_CLOGF
 
+/* Define to 1 if you have the `clogf128' function. */
+#undef HAVE_CLOGF128
+
 /* Define to 1 if you have the `clogl' function. */
 #undef HAVE_CLOGL
 
@@ -240,6 +303,9 @@
 /* Define to 1 if you have the `copysignf' function. */
 #undef HAVE_COPYSIGNF
 
+/* Define to 1 if you have the `copysignf128' function. */
+#undef HAVE_COPYSIGNF128
+
 /* Define to 1 if you have the `copysignl' function. */
 #undef HAVE_COPYSIGNL
 
@@ -249,12 +315,18 @@
 /* Define to 1 if you have the `cosf' function. */
 #undef HAVE_COSF
 
+/* Define to 1 if you have the `cosf128' function. */
+#undef HAVE_COSF128
+
 /* Define to 1 if you have the `cosh' function. */
 #undef HAVE_COSH
 
 /* Define to 1 if you have the `coshf' function. */
 #undef HAVE_COSHF
 
+/* Define to 1 if you have the `coshf128' function. */
+#undef HAVE_COSHF128
+
 /* Define to 1 if you have the `coshl' function. */
 #undef HAVE_COSHL
 
@@ -267,6 +339,9 @@
 /* Define to 1 if you have the `cpowf' function. */
 #undef HAVE_CPOWF
 
+/* Define to 1 if you have the `cpowf128' function. */
+#undef HAVE_CPOWF128
+
 /* Define to 1 if you have the `cpowl' function. */
 #undef HAVE_CPOWL
 
@@ -279,12 +354,18 @@
 /* Define to 1 if you have the `csinf' function. */
 #undef HAVE_CSINF
 
+/* Define to 1 if you have the `csinf128' function. */
+#undef HAVE_CSINF128
+
 /* Define to 1 if you have the `csinh' function. */
 #undef HAVE_CSINH
 
 /* Define to 1 if you have the `csinhf' function. */
 #undef HAVE_CSINHF
 
+/* Define to 1 if you have the `csinhf128' function. */
+#undef HAVE_CSINHF128
+
 /* Define to 1 if you have the `csinhl' function. */
 #undef HAVE_CSINHL
 
@@ -297,6 +378,9 @@
 /* Define to 1 if you have the `csqrtf' function. */
 #undef HAVE_CSQRTF
 
+/* Define to 1 if you have the `csqrtf128' function. */
+#undef HAVE_CSQRTF128
+
 /* Define to 1 if you have the `csqrtl' function. */
 #undef HAVE_CSQRTL
 
@@ -306,12 +390,18 @@
 /* Define to 1 if you have the `ctanf' function. */
 #undef HAVE_CTANF
 
+/* Define to 1 if you have the `ctanf128' function. */
+#undef HAVE_CTANF128
+
 /* Define to 1 if you have the `ctanh' function. */
 #undef HAVE_CTANH
 
 /* Define to 1 if you have the `ctanhf' function. */
 #undef HAVE_CTANHF
 
+/* Define to 1 if you have the `ctanhf128' function. */
+#undef HAVE_CTANHF128
+
 /* Define to 1 if you have the `ctanhl' function. */
 #undef HAVE_CTANHL
 
@@ -333,18 +423,27 @@
 /* Define to 1 if you have the `erfcf' function. */
 #undef HAVE_ERFCF
 
+/* Define to 1 if you have the `erfcf128' function. */
+#undef HAVE_ERFCF128
+
 /* Define to 1 if you have the `erfcl' function. */
 #undef HAVE_ERFCL
 
 /* Define to 1 if you have the `erff' function. */
 #undef HAVE_ERFF
 
+/* Define to 1 if you have the `erff128' function. */
+#undef HAVE_ERFF128
+
 /* Define to 1 if you have the `exp' function. */
 #undef HAVE_EXP
 
 /* Define to 1 if you have the `expf' function. */
 #undef HAVE_EXPF
 
+/* Define to 1 if you have the `expf128' function. */
+#undef HAVE_EXPF128
+
 /* Define to 1 if you have the `expl' function. */
 #undef HAVE_EXPL
 
@@ -354,6 +453,9 @@
 /* Define to 1 if you have the `fabsf' function. */
 #undef HAVE_FABSF
 
+/* Define to 1 if you have the `fabsf128' function. */
+#undef HAVE_FABSF128
+
 /* Define to 1 if you have the `fabsl' function. */
 #undef HAVE_FABSL
 
@@ -378,6 +480,9 @@
 /* Define to 1 if you have the `floorf' function. */
 #undef HAVE_FLOORF
 
+/* Define to 1 if you have the `floorf128' function. */
+#undef HAVE_FLOORF128
+
 /* Define to 1 if you have the `floorl' function. */
 #undef HAVE_FLOORL
 
@@ -393,6 +498,9 @@
 /* Define to 1 if you have the `fmaf' function. */
 #undef HAVE_FMAF
 
+/* Define to 1 if you have the `fmaf128' function. */
+#undef HAVE_FMAF128
+
 /* Define to 1 if you have the `fmal' function. */
 #undef HAVE_FMAL
 
@@ -402,6 +510,9 @@
 /* Define to 1 if you have the `fmodf' function. */
 #undef HAVE_FMODF
 
+/* Define to 1 if you have the `fmodf128' function. */
+#undef HAVE_FMODF128
+
 /* Define to 1 if you have the `fmodl' function. */
 #undef HAVE_FMODL
 
@@ -450,6 +561,9 @@
 /* Define to 1 if you have the `frexpf' function. */
 #undef HAVE_FREXPF
 
+/* Define to 1 if you have the `frexpf128' function. */
+#undef HAVE_FREXPF128
+
 /* Define to 1 if you have the `frexpl' function. */
 #undef HAVE_FREXPL
 
@@ -507,6 +621,9 @@
 /* Define to 1 if you have the `hypotf' function. */
 #undef HAVE_HYPOTF
 
+/* Define to 1 if you have the `hypotf128' function. */
+#undef HAVE_HYPOTF128
+
 /* Define to 1 if you have the `hypotl' function. */
 #undef HAVE_HYPOTL
 
@@ -537,18 +654,27 @@
 /* Define to 1 if you have the `j0f' function. */
 #undef HAVE_J0F
 
+/* Define to 1 if you have the `j0f128' function. */
+#undef HAVE_J0F128
+
 /* Define to 1 if you have the `j1' function. */
 #undef HAVE_J1
 
 /* Define to 1 if you have the `j1f' function. */
 #undef HAVE_J1F
 
+/* Define to 1 if you have the `j1f128' function. */
+#undef HAVE_J1F128
+
 /* Define to 1 if you have the `jn' function. */
 #undef HAVE_JN
 
 /* Define to 1 if you have the `jnf' function. */
 #undef HAVE_JNF
 
+/* Define to 1 if you have the `jnf128' function. */
+#undef HAVE_JNF128
+
 /* Define to 1 if you have the `jnl' function. */
 #undef HAVE_JNL
 
@@ -561,6 +687,9 @@
 /* Define to 1 if you have the `ldexpf' function. */
 #undef HAVE_LDEXPF
 
+/* Define to 1 if you have the `ldexpf128' function. */
+#undef HAVE_LDEXPF128
+
 /* Define to 1 if you have the `ldexpl' function. */
 #undef HAVE_LDEXPL
 
@@ -570,6 +699,9 @@
 /* Define to 1 if you have the `lgammaf' function. */
 #undef HAVE_LGAMMAF
 
+/* Define to 1 if you have the `lgammaf128' function. */
+#undef HAVE_LGAMMAF128
+
 /* Define to 1 if you have the `m' library (-lm). */
 #undef HAVE_LIBM
 
@@ -582,6 +714,9 @@
 /* Define to 1 if you have the `llroundf' function. */
 #undef HAVE_LLROUNDF
 
+/* Define to 1 if you have the `llroundf128' function. */
+#undef HAVE_LLROUNDF128
+
 /* Define to 1 if you have the `llroundl' function. */
 #undef HAVE_LLROUNDL
 
@@ -597,12 +732,18 @@
 /* Define to 1 if you have the `log10f' function. */
 #undef HAVE_LOG10F
 
+/* Define to 1 if you have the `log10f128' function. */
+#undef HAVE_LOG10F128
+
 /* Define to 1 if you have the `log10l' function. */
 #undef HAVE_LOG10L
 
 /* Define to 1 if you have the `logf' function. */
 #undef HAVE_LOGF
 
+/* Define to 1 if you have the `logf128' function. */
+#undef HAVE_LOGF128
+
 /* Define to 1 if you have the `logl' function. */
 #undef HAVE_LOGL
 
@@ -612,6 +753,9 @@
 /* Define to 1 if you have the `lroundf' function. */
 #undef HAVE_LROUNDF
 
+/* Define to 1 if you have the `lroundf128' function. */
+#undef HAVE_LROUNDF128
+
 /* Define to 1 if you have the `lroundl' function. */
 #undef HAVE_LROUNDL
 
@@ -642,6 +786,9 @@
 /* Define to 1 if you have the `nextafterf' function. */
 #undef HAVE_NEXTAFTERF
 
+/* Define to 1 if you have the `nextafterf128' function. */
+#undef HAVE_NEXTAFTERF128
+
 /* Define to 1 if you have the `nextafterl' function. */
 #undef HAVE_NEXTAFTERL
 
@@ -657,6 +804,9 @@
 /* Define to 1 if you have the `powf' function. */
 #undef HAVE_POWF
 
+/* Define to 1 if you have the `powf128' function. */
+#undef HAVE_POWF128
+
 /* Define to 1 if the system has the type `ptrdiff_t'. */
 #undef HAVE_PTRDIFF_T
 
@@ -672,6 +822,9 @@
 /* Define to 1 if you have the `roundf' function. */
 #undef HAVE_ROUNDF
 
+/* Define to 1 if you have the `roundf128' function. */
+#undef HAVE_ROUNDF128
+
 /* Define to 1 if you have the `roundl' function. */
 #undef HAVE_ROUNDL
 
@@ -681,6 +834,9 @@
 /* Define to 1 if you have the `scalbnf' function. */
 #undef HAVE_SCALBNF
 
+/* Define to 1 if you have the `scalbnf128' function. */
+#undef HAVE_SCALBNF128
+
 /* Define to 1 if you have the `scalbnl' function. */
 #undef HAVE_SCALBNL
 
@@ -699,12 +855,18 @@
 /* Define to 1 if you have the `sinf' function. */
 #undef HAVE_SINF
 
+/* Define to 1 if you have the `sinf128' function. */
+#undef HAVE_SINF128
+
 /* Define to 1 if you have the `sinh' function. */
 #undef HAVE_SINH
 
 /* Define to 1 if you have the `sinhf' function. */
 #undef HAVE_SINHF
 
+/* Define to 1 if you have the `sinhf128' function. */
+#undef HAVE_SINHF128
+
 /* Define to 1 if you have the `sinhl' function. */
 #undef HAVE_SINHL
 
@@ -723,6 +885,9 @@
 /* Define to 1 if you have the `sqrtf' function. */
 #undef HAVE_SQRTF
 
+/* Define to 1 if you have the `sqrtf128' function. */
+#undef HAVE_SQRTF128
+
 /* Define to 1 if you have the `sqrtl' function. */
 #undef HAVE_SQRTL
 
@@ -744,6 +909,9 @@
 /* Define if strerror_r takes two arguments and is available in <string.h>. */
 #undef HAVE_STRERROR_R_2ARGS
 
+/* Define to 1 if you have the `strfromf128' function. */
+#undef HAVE_STRFROMF128
+
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
@@ -759,6 +927,9 @@
 /* Define to 1 if you have the `strtof' function. */
 #undef HAVE_STRTOF
 
+/* Define to 1 if you have the `strtof128' function. */
+#undef HAVE_STRTOF128
+
 /* Define to 1 if you have the `strtold' function. */
 #undef HAVE_STRTOLD
 
@@ -804,12 +975,18 @@
 /* Define to 1 if you have the `tanf' function. */
 #undef HAVE_TANF
 
+/* Define to 1 if you have the `tanf128' function. */
+#undef HAVE_TANF128
+
 /* Define to 1 if you have the `tanh' function. */
 #undef HAVE_TANH
 
 /* Define to 1 if you have the `tanhf' function. */
 #undef HAVE_TANHF
 
+/* Define to 1 if you have the `tanhf128' function. */
+#undef HAVE_TANHF128
+
 /* Define to 1 if you have the `tanhl' function. */
 #undef HAVE_TANHL
 
@@ -822,6 +999,9 @@
 /* Define to 1 if you have the `tgammaf' function. */
 #undef HAVE_TGAMMAF
 
+/* Define to 1 if you have the `tgammaf128' function. */
+#undef HAVE_TGAMMAF128
+
 /* Define to 1 if you have the `times' function. */
 #undef HAVE_TIMES
 
@@ -831,6 +1011,9 @@
 /* Define to 1 if you have the `truncf' function. */
 #undef HAVE_TRUNCF
 
+/* Define to 1 if you have the `truncf128' function. */
+#undef HAVE_TRUNCF128
+
 /* Define to 1 if you have the `truncl' function. */
 #undef HAVE_TRUNCL
 
@@ -876,21 +1059,33 @@
 /* Define to 1 if you have the `y0f' function. */
 #undef HAVE_Y0F
 
+/* Define to 1 if you have the `y0f128' function. */
+#undef HAVE_Y0F128
+
 /* Define to 1 if you have the `y1' function. */
 #undef HAVE_Y1
 
 /* Define to 1 if you have the `y1f' function. */
 #undef HAVE_Y1F
 
+/* Define to 1 if you have the `y1f128' function. */
+#undef HAVE_Y1F128
+
 /* Define to 1 if you have the `yn' function. */
 #undef HAVE_YN
 
 /* Define to 1 if you have the `ynf' function. */
 #undef HAVE_YNF
 
+/* Define to 1 if you have the `ynf128' function. */
+#undef HAVE_YNF128
+
 /* Define to 1 if you have the `ynl' function. */
 #undef HAVE_YNL
 
+/* Define if have a usable _Float128 type. */
+#undef HAVE__FLOAT128
+
 /* Define to 1 if you have the `__acoshieee128' function. */
 #undef HAVE___ACOSHIEEE128
 
--- libgfortran/configure.jj	2022-01-11 23:45:58.230109340 +0100
+++ libgfortran/configure	2022-06-22 12:42:30.272312619 +0200
@@ -647,6 +647,7 @@ IEEE_SUPPORT_TRUE
 FPU_HOST_HEADER
 LIBGFOR_BUILD_QUAD_FALSE
 LIBGFOR_BUILD_QUAD_TRUE
+HAVE__FLOAT128
 LIBQUADINCLUDE
 LIBQUADLIB_DEP
 LIBQUADLIB
@@ -2673,6 +2674,8 @@ as_fn_append ac_func_list " newlocale"
 as_fn_append ac_func_list " freelocale"
 as_fn_append ac_func_list " uselocale"
 as_fn_append ac_func_list " strerror_l"
+as_fn_append ac_func_list " strtof128"
+as_fn_append ac_func_list " strfromf128"
 as_fn_append ac_header_list " math.h"
 # Check that the precious variables saved in the cache have kept the same
 # value.
@@ -12766,7 +12769,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12769 "configure"
+#line 12772 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12872,7 +12875,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12875 "configure"
+#line 12878 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17184,6 +17187,10 @@ done
 
 
 
+
+
+
+
 fi
 
 # Check strerror_r, cannot be above as versions with two and three arguments exist
@@ -26997,6 +27004,2984 @@ _ACEOF
   fi
 fi
 
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosf128" >&5
+$as_echo_n "checking for acosf128... " >&6; }
+if ${gcc_cv_math_func_acosf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())acosf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_acosf128=yes
+else
+  gcc_cv_math_func_acosf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_acosf128" >&5
+$as_echo "$gcc_cv_math_func_acosf128" >&6; }
+  if test $gcc_cv_math_func_acosf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acoshf128" >&5
+$as_echo_n "checking for acoshf128... " >&6; }
+if ${gcc_cv_math_func_acoshf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())acoshf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_acoshf128=yes
+else
+  gcc_cv_math_func_acoshf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_acoshf128" >&5
+$as_echo "$gcc_cv_math_func_acoshf128" >&6; }
+  if test $gcc_cv_math_func_acoshf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinf128" >&5
+$as_echo_n "checking for asinf128... " >&6; }
+if ${gcc_cv_math_func_asinf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())asinf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_asinf128=yes
+else
+  gcc_cv_math_func_asinf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_asinf128" >&5
+$as_echo "$gcc_cv_math_func_asinf128" >&6; }
+  if test $gcc_cv_math_func_asinf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinhf128" >&5
+$as_echo_n "checking for asinhf128... " >&6; }
+if ${gcc_cv_math_func_asinhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())asinhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_asinhf128=yes
+else
+  gcc_cv_math_func_asinhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_asinhf128" >&5
+$as_echo "$gcc_cv_math_func_asinhf128" >&6; }
+  if test $gcc_cv_math_func_asinhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2f128" >&5
+$as_echo_n "checking for atan2f128... " >&6; }
+if ${gcc_cv_math_func_atan2f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())atan2f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_atan2f128=yes
+else
+  gcc_cv_math_func_atan2f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_atan2f128" >&5
+$as_echo "$gcc_cv_math_func_atan2f128" >&6; }
+  if test $gcc_cv_math_func_atan2f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATAN2F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanf128" >&5
+$as_echo_n "checking for atanf128... " >&6; }
+if ${gcc_cv_math_func_atanf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())atanf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_atanf128=yes
+else
+  gcc_cv_math_func_atanf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_atanf128" >&5
+$as_echo "$gcc_cv_math_func_atanf128" >&6; }
+  if test $gcc_cv_math_func_atanf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanhf128" >&5
+$as_echo_n "checking for atanhf128... " >&6; }
+if ${gcc_cv_math_func_atanhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())atanhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_atanhf128=yes
+else
+  gcc_cv_math_func_atanhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_atanhf128" >&5
+$as_echo "$gcc_cv_math_func_atanhf128" >&6; }
+  if test $gcc_cv_math_func_atanhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cargf128" >&5
+$as_echo_n "checking for cargf128... " >&6; }
+if ${gcc_cv_math_func_cargf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cargf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cargf128=yes
+else
+  gcc_cv_math_func_cargf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cargf128" >&5
+$as_echo "$gcc_cv_math_func_cargf128" >&6; }
+  if test $gcc_cv_math_func_cargf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CARGF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceilf128" >&5
+$as_echo_n "checking for ceilf128... " >&6; }
+if ${gcc_cv_math_func_ceilf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ceilf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ceilf128=yes
+else
+  gcc_cv_math_func_ceilf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ceilf128" >&5
+$as_echo "$gcc_cv_math_func_ceilf128" >&6; }
+  if test $gcc_cv_math_func_ceilf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CEILF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for copysignf128" >&5
+$as_echo_n "checking for copysignf128... " >&6; }
+if ${gcc_cv_math_func_copysignf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())copysignf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_copysignf128=yes
+else
+  gcc_cv_math_func_copysignf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_copysignf128" >&5
+$as_echo "$gcc_cv_math_func_copysignf128" >&6; }
+  if test $gcc_cv_math_func_copysignf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_COPYSIGNF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosf128" >&5
+$as_echo_n "checking for cosf128... " >&6; }
+if ${gcc_cv_math_func_cosf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cosf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cosf128=yes
+else
+  gcc_cv_math_func_cosf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cosf128" >&5
+$as_echo "$gcc_cv_math_func_cosf128" >&6; }
+  if test $gcc_cv_math_func_cosf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_COSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccosf128" >&5
+$as_echo_n "checking for ccosf128... " >&6; }
+if ${gcc_cv_math_func_ccosf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ccosf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ccosf128=yes
+else
+  gcc_cv_math_func_ccosf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ccosf128" >&5
+$as_echo "$gcc_cv_math_func_ccosf128" >&6; }
+  if test $gcc_cv_math_func_ccosf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CCOSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for coshf128" >&5
+$as_echo_n "checking for coshf128... " >&6; }
+if ${gcc_cv_math_func_coshf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())coshf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_coshf128=yes
+else
+  gcc_cv_math_func_coshf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_coshf128" >&5
+$as_echo "$gcc_cv_math_func_coshf128" >&6; }
+  if test $gcc_cv_math_func_coshf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_COSHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccoshf128" >&5
+$as_echo_n "checking for ccoshf128... " >&6; }
+if ${gcc_cv_math_func_ccoshf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ccoshf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ccoshf128=yes
+else
+  gcc_cv_math_func_ccoshf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ccoshf128" >&5
+$as_echo "$gcc_cv_math_func_ccoshf128" >&6; }
+  if test $gcc_cv_math_func_ccoshf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CCOSHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expf128" >&5
+$as_echo_n "checking for expf128... " >&6; }
+if ${gcc_cv_math_func_expf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())expf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_expf128=yes
+else
+  gcc_cv_math_func_expf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_expf128" >&5
+$as_echo "$gcc_cv_math_func_expf128" >&6; }
+  if test $gcc_cv_math_func_expf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_EXPF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cexpf128" >&5
+$as_echo_n "checking for cexpf128... " >&6; }
+if ${gcc_cv_math_func_cexpf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cexpf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cexpf128=yes
+else
+  gcc_cv_math_func_cexpf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cexpf128" >&5
+$as_echo "$gcc_cv_math_func_cexpf128" >&6; }
+  if test $gcc_cv_math_func_cexpf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CEXPF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsf128" >&5
+$as_echo_n "checking for fabsf128... " >&6; }
+if ${gcc_cv_math_func_fabsf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())fabsf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_fabsf128=yes
+else
+  gcc_cv_math_func_fabsf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_fabsf128" >&5
+$as_echo "$gcc_cv_math_func_fabsf128" >&6; }
+  if test $gcc_cv_math_func_fabsf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FABSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cabsf128" >&5
+$as_echo_n "checking for cabsf128... " >&6; }
+if ${gcc_cv_math_func_cabsf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cabsf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cabsf128=yes
+else
+  gcc_cv_math_func_cabsf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cabsf128" >&5
+$as_echo "$gcc_cv_math_func_cabsf128" >&6; }
+  if test $gcc_cv_math_func_cabsf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CABSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floorf128" >&5
+$as_echo_n "checking for floorf128... " >&6; }
+if ${gcc_cv_math_func_floorf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())floorf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_floorf128=yes
+else
+  gcc_cv_math_func_floorf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_floorf128" >&5
+$as_echo "$gcc_cv_math_func_floorf128" >&6; }
+  if test $gcc_cv_math_func_floorf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOORF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmaf128" >&5
+$as_echo_n "checking for fmaf128... " >&6; }
+if ${gcc_cv_math_func_fmaf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())fmaf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_fmaf128=yes
+else
+  gcc_cv_math_func_fmaf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_fmaf128" >&5
+$as_echo "$gcc_cv_math_func_fmaf128" >&6; }
+  if test $gcc_cv_math_func_fmaf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FMAF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodf128" >&5
+$as_echo_n "checking for fmodf128... " >&6; }
+if ${gcc_cv_math_func_fmodf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())fmodf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_fmodf128=yes
+else
+  gcc_cv_math_func_fmodf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_fmodf128" >&5
+$as_echo "$gcc_cv_math_func_fmodf128" >&6; }
+  if test $gcc_cv_math_func_fmodf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FMODF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpf128" >&5
+$as_echo_n "checking for frexpf128... " >&6; }
+if ${gcc_cv_math_func_frexpf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())frexpf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_frexpf128=yes
+else
+  gcc_cv_math_func_frexpf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_frexpf128" >&5
+$as_echo "$gcc_cv_math_func_frexpf128" >&6; }
+  if test $gcc_cv_math_func_frexpf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FREXPF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotf128" >&5
+$as_echo_n "checking for hypotf128... " >&6; }
+if ${gcc_cv_math_func_hypotf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())hypotf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_hypotf128=yes
+else
+  gcc_cv_math_func_hypotf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_hypotf128" >&5
+$as_echo "$gcc_cv_math_func_hypotf128" >&6; }
+  if test $gcc_cv_math_func_hypotf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPOTF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpf128" >&5
+$as_echo_n "checking for ldexpf128... " >&6; }
+if ${gcc_cv_math_func_ldexpf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ldexpf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ldexpf128=yes
+else
+  gcc_cv_math_func_ldexpf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ldexpf128" >&5
+$as_echo "$gcc_cv_math_func_ldexpf128" >&6; }
+  if test $gcc_cv_math_func_ldexpf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LDEXPF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logf128" >&5
+$as_echo_n "checking for logf128... " >&6; }
+if ${gcc_cv_math_func_logf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())logf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_logf128=yes
+else
+  gcc_cv_math_func_logf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_logf128" >&5
+$as_echo "$gcc_cv_math_func_logf128" >&6; }
+  if test $gcc_cv_math_func_logf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clogf128" >&5
+$as_echo_n "checking for clogf128... " >&6; }
+if ${gcc_cv_math_func_clogf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())clogf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_clogf128=yes
+else
+  gcc_cv_math_func_clogf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_clogf128" >&5
+$as_echo "$gcc_cv_math_func_clogf128" >&6; }
+  if test $gcc_cv_math_func_clogf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOGF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10f128" >&5
+$as_echo_n "checking for log10f128... " >&6; }
+if ${gcc_cv_math_func_log10f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())log10f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_log10f128=yes
+else
+  gcc_cv_math_func_log10f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_log10f128" >&5
+$as_echo "$gcc_cv_math_func_log10f128" >&6; }
+  if test $gcc_cv_math_func_log10f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG10F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clog10f128" >&5
+$as_echo_n "checking for clog10f128... " >&6; }
+if ${gcc_cv_math_func_clog10f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())clog10f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_clog10f128=yes
+else
+  gcc_cv_math_func_clog10f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_clog10f128" >&5
+$as_echo "$gcc_cv_math_func_clog10f128" >&6; }
+  if test $gcc_cv_math_func_clog10f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOG10F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nextafterf128" >&5
+$as_echo_n "checking for nextafterf128... " >&6; }
+if ${gcc_cv_math_func_nextafterf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())nextafterf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_nextafterf128=yes
+else
+  gcc_cv_math_func_nextafterf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_nextafterf128" >&5
+$as_echo "$gcc_cv_math_func_nextafterf128" >&6; }
+  if test $gcc_cv_math_func_nextafterf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_NEXTAFTERF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powf128" >&5
+$as_echo_n "checking for powf128... " >&6; }
+if ${gcc_cv_math_func_powf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())powf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_powf128=yes
+else
+  gcc_cv_math_func_powf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_powf128" >&5
+$as_echo "$gcc_cv_math_func_powf128" >&6; }
+  if test $gcc_cv_math_func_powf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_POWF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpowf128" >&5
+$as_echo_n "checking for cpowf128... " >&6; }
+if ${gcc_cv_math_func_cpowf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cpowf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cpowf128=yes
+else
+  gcc_cv_math_func_cpowf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cpowf128" >&5
+$as_echo "$gcc_cv_math_func_cpowf128" >&6; }
+  if test $gcc_cv_math_func_cpowf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CPOWF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for roundf128" >&5
+$as_echo_n "checking for roundf128... " >&6; }
+if ${gcc_cv_math_func_roundf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())roundf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_roundf128=yes
+else
+  gcc_cv_math_func_roundf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_roundf128" >&5
+$as_echo "$gcc_cv_math_func_roundf128" >&6; }
+  if test $gcc_cv_math_func_roundf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ROUNDF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lroundf128" >&5
+$as_echo_n "checking for lroundf128... " >&6; }
+if ${gcc_cv_math_func_lroundf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())lroundf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_lroundf128=yes
+else
+  gcc_cv_math_func_lroundf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_lroundf128" >&5
+$as_echo "$gcc_cv_math_func_lroundf128" >&6; }
+  if test $gcc_cv_math_func_lroundf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LROUNDF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for llroundf128" >&5
+$as_echo_n "checking for llroundf128... " >&6; }
+if ${gcc_cv_math_func_llroundf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())llroundf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_llroundf128=yes
+else
+  gcc_cv_math_func_llroundf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_llroundf128" >&5
+$as_echo "$gcc_cv_math_func_llroundf128" >&6; }
+  if test $gcc_cv_math_func_llroundf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LLROUNDF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scalbnf128" >&5
+$as_echo_n "checking for scalbnf128... " >&6; }
+if ${gcc_cv_math_func_scalbnf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())scalbnf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_scalbnf128=yes
+else
+  gcc_cv_math_func_scalbnf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_scalbnf128" >&5
+$as_echo "$gcc_cv_math_func_scalbnf128" >&6; }
+  if test $gcc_cv_math_func_scalbnf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SCALBNF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinf128" >&5
+$as_echo_n "checking for sinf128... " >&6; }
+if ${gcc_cv_math_func_sinf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())sinf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_sinf128=yes
+else
+  gcc_cv_math_func_sinf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_sinf128" >&5
+$as_echo "$gcc_cv_math_func_sinf128" >&6; }
+  if test $gcc_cv_math_func_sinf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SINF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csinf128" >&5
+$as_echo_n "checking for csinf128... " >&6; }
+if ${gcc_cv_math_func_csinf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())csinf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_csinf128=yes
+else
+  gcc_cv_math_func_csinf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_csinf128" >&5
+$as_echo "$gcc_cv_math_func_csinf128" >&6; }
+  if test $gcc_cv_math_func_csinf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CSINF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinhf128" >&5
+$as_echo_n "checking for sinhf128... " >&6; }
+if ${gcc_cv_math_func_sinhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())sinhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_sinhf128=yes
+else
+  gcc_cv_math_func_sinhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_sinhf128" >&5
+$as_echo "$gcc_cv_math_func_sinhf128" >&6; }
+  if test $gcc_cv_math_func_sinhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SINHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csinhf128" >&5
+$as_echo_n "checking for csinhf128... " >&6; }
+if ${gcc_cv_math_func_csinhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())csinhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_csinhf128=yes
+else
+  gcc_cv_math_func_csinhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_csinhf128" >&5
+$as_echo "$gcc_cv_math_func_csinhf128" >&6; }
+  if test $gcc_cv_math_func_csinhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CSINHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtf128" >&5
+$as_echo_n "checking for sqrtf128... " >&6; }
+if ${gcc_cv_math_func_sqrtf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())sqrtf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_sqrtf128=yes
+else
+  gcc_cv_math_func_sqrtf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_sqrtf128" >&5
+$as_echo "$gcc_cv_math_func_sqrtf128" >&6; }
+  if test $gcc_cv_math_func_sqrtf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRTF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csqrtf128" >&5
+$as_echo_n "checking for csqrtf128... " >&6; }
+if ${gcc_cv_math_func_csqrtf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())csqrtf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_csqrtf128=yes
+else
+  gcc_cv_math_func_csqrtf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_csqrtf128" >&5
+$as_echo "$gcc_cv_math_func_csqrtf128" >&6; }
+  if test $gcc_cv_math_func_csqrtf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CSQRTF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanf128" >&5
+$as_echo_n "checking for tanf128... " >&6; }
+if ${gcc_cv_math_func_tanf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())tanf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_tanf128=yes
+else
+  gcc_cv_math_func_tanf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_tanf128" >&5
+$as_echo "$gcc_cv_math_func_tanf128" >&6; }
+  if test $gcc_cv_math_func_tanf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_TANF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctanf128" >&5
+$as_echo_n "checking for ctanf128... " >&6; }
+if ${gcc_cv_math_func_ctanf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ctanf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ctanf128=yes
+else
+  gcc_cv_math_func_ctanf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ctanf128" >&5
+$as_echo "$gcc_cv_math_func_ctanf128" >&6; }
+  if test $gcc_cv_math_func_ctanf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CTANF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanhf128" >&5
+$as_echo_n "checking for tanhf128... " >&6; }
+if ${gcc_cv_math_func_tanhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())tanhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_tanhf128=yes
+else
+  gcc_cv_math_func_tanhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_tanhf128" >&5
+$as_echo "$gcc_cv_math_func_tanhf128" >&6; }
+  if test $gcc_cv_math_func_tanhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_TANHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctanhf128" >&5
+$as_echo_n "checking for ctanhf128... " >&6; }
+if ${gcc_cv_math_func_ctanhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ctanhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ctanhf128=yes
+else
+  gcc_cv_math_func_ctanhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ctanhf128" >&5
+$as_echo "$gcc_cv_math_func_ctanhf128" >&6; }
+  if test $gcc_cv_math_func_ctanhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CTANHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for truncf128" >&5
+$as_echo_n "checking for truncf128... " >&6; }
+if ${gcc_cv_math_func_truncf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())truncf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_truncf128=yes
+else
+  gcc_cv_math_func_truncf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_truncf128" >&5
+$as_echo "$gcc_cv_math_func_truncf128" >&6; }
+  if test $gcc_cv_math_func_truncf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_TRUNCF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for erff128" >&5
+$as_echo_n "checking for erff128... " >&6; }
+if ${gcc_cv_math_func_erff128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())erff128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_erff128=yes
+else
+  gcc_cv_math_func_erff128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_erff128" >&5
+$as_echo "$gcc_cv_math_func_erff128" >&6; }
+  if test $gcc_cv_math_func_erff128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ERFF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for erfcf128" >&5
+$as_echo_n "checking for erfcf128... " >&6; }
+if ${gcc_cv_math_func_erfcf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())erfcf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_erfcf128=yes
+else
+  gcc_cv_math_func_erfcf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_erfcf128" >&5
+$as_echo "$gcc_cv_math_func_erfcf128" >&6; }
+  if test $gcc_cv_math_func_erfcf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ERFCF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for j0f128" >&5
+$as_echo_n "checking for j0f128... " >&6; }
+if ${gcc_cv_math_func_j0f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())j0f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_j0f128=yes
+else
+  gcc_cv_math_func_j0f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_j0f128" >&5
+$as_echo "$gcc_cv_math_func_j0f128" >&6; }
+  if test $gcc_cv_math_func_j0f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_J0F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for j1f128" >&5
+$as_echo_n "checking for j1f128... " >&6; }
+if ${gcc_cv_math_func_j1f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())j1f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_j1f128=yes
+else
+  gcc_cv_math_func_j1f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_j1f128" >&5
+$as_echo "$gcc_cv_math_func_j1f128" >&6; }
+  if test $gcc_cv_math_func_j1f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_J1F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jnf128" >&5
+$as_echo_n "checking for jnf128... " >&6; }
+if ${gcc_cv_math_func_jnf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())jnf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_jnf128=yes
+else
+  gcc_cv_math_func_jnf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_jnf128" >&5
+$as_echo "$gcc_cv_math_func_jnf128" >&6; }
+  if test $gcc_cv_math_func_jnf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_JNF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for y0f128" >&5
+$as_echo_n "checking for y0f128... " >&6; }
+if ${gcc_cv_math_func_y0f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())y0f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_y0f128=yes
+else
+  gcc_cv_math_func_y0f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_y0f128" >&5
+$as_echo "$gcc_cv_math_func_y0f128" >&6; }
+  if test $gcc_cv_math_func_y0f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_Y0F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for y1f128" >&5
+$as_echo_n "checking for y1f128... " >&6; }
+if ${gcc_cv_math_func_y1f128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())y1f128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_y1f128=yes
+else
+  gcc_cv_math_func_y1f128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_y1f128" >&5
+$as_echo "$gcc_cv_math_func_y1f128" >&6; }
+  if test $gcc_cv_math_func_y1f128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_Y1F128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ynf128" >&5
+$as_echo_n "checking for ynf128... " >&6; }
+if ${gcc_cv_math_func_ynf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())ynf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_ynf128=yes
+else
+  gcc_cv_math_func_ynf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_ynf128" >&5
+$as_echo "$gcc_cv_math_func_ynf128" >&6; }
+  if test $gcc_cv_math_func_ynf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_YNF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgammaf128" >&5
+$as_echo_n "checking for tgammaf128... " >&6; }
+if ${gcc_cv_math_func_tgammaf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())tgammaf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_tgammaf128=yes
+else
+  gcc_cv_math_func_tgammaf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_tgammaf128" >&5
+$as_echo "$gcc_cv_math_func_tgammaf128" >&6; }
+  if test $gcc_cv_math_func_tgammaf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_TGAMMAF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgammaf128" >&5
+$as_echo_n "checking for lgammaf128... " >&6; }
+if ${gcc_cv_math_func_lgammaf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())lgammaf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_lgammaf128=yes
+else
+  gcc_cv_math_func_lgammaf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_lgammaf128" >&5
+$as_echo "$gcc_cv_math_func_lgammaf128" >&6; }
+  if test $gcc_cv_math_func_lgammaf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LGAMMAF128 1
+_ACEOF
+
+  fi
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacosf128" >&5
+$as_echo_n "checking for cacosf128... " >&6; }
+if ${gcc_cv_math_func_cacosf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cacosf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cacosf128=yes
+else
+  gcc_cv_math_func_cacosf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cacosf128" >&5
+$as_echo "$gcc_cv_math_func_cacosf128" >&6; }
+  if test $gcc_cv_math_func_cacosf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CACOSF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacoshf128" >&5
+$as_echo_n "checking for cacoshf128... " >&6; }
+if ${gcc_cv_math_func_cacoshf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())cacoshf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_cacoshf128=yes
+else
+  gcc_cv_math_func_cacoshf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_cacoshf128" >&5
+$as_echo "$gcc_cv_math_func_cacoshf128" >&6; }
+  if test $gcc_cv_math_func_cacoshf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CACOSHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for casinf128" >&5
+$as_echo_n "checking for casinf128... " >&6; }
+if ${gcc_cv_math_func_casinf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())casinf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_casinf128=yes
+else
+  gcc_cv_math_func_casinf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_casinf128" >&5
+$as_echo "$gcc_cv_math_func_casinf128" >&6; }
+  if test $gcc_cv_math_func_casinf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CASINF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for casinhf128" >&5
+$as_echo_n "checking for casinhf128... " >&6; }
+if ${gcc_cv_math_func_casinhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())casinhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_casinhf128=yes
+else
+  gcc_cv_math_func_casinhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_casinhf128" >&5
+$as_echo "$gcc_cv_math_func_casinhf128" >&6; }
+  if test $gcc_cv_math_func_casinhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CASINHF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catanf128" >&5
+$as_echo_n "checking for catanf128... " >&6; }
+if ${gcc_cv_math_func_catanf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())catanf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_catanf128=yes
+else
+  gcc_cv_math_func_catanf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_catanf128" >&5
+$as_echo "$gcc_cv_math_func_catanf128" >&6; }
+  if test $gcc_cv_math_func_catanf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CATANF128 1
+_ACEOF
+
+  fi
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catanhf128" >&5
+$as_echo_n "checking for catanhf128... " >&6; }
+if ${gcc_cv_math_func_catanhf128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+#ifdef HAVE_MATH_H
+#include <math.h>
+#endif
+
+int (*ptr)() = (int (*)())catanhf128;
+
+int
+main ()
+{
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gcc_cv_math_func_catanhf128=yes
+else
+  gcc_cv_math_func_catanhf128=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func_catanhf128" >&5
+$as_echo "$gcc_cv_math_func_catanhf128" >&6; }
+  if test $gcc_cv_math_func_catanhf128 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CATANHF128 1
+_ACEOF
+
+  fi
+
+
 # Check whether the system has a working stat()
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target stat is reliable" >&5
@@ -27099,13 +30084,23 @@ $as_echo "#define HAVE_MINGW_SNPRINTF 1"
   fi
 
 
+have__Float128_libc_support=no
+if test "x$ac_cv_func_strtof128$ac_cv_func_strfromf128" = xyesyes \
+   && test "x$gcc_cv_math_func_sinf128$gcc_cv_math_func_cacosf128" = xyesyes; then
+  have__Float128_libc_support=yes
+fi
+
 # Check whether libquadmath should be used
 # Check whether --enable-libquadmath-support was given.
 if test "${enable_libquadmath_support+set}" = set; then :
   enableval=$enable_libquadmath_support; ENABLE_LIBQUADMATH_SUPPORT=$enableval
 else
+  if test "x$have__Float128_libc_support" = xyes; then
+  ENABLE_LIBQUADMATH_SUPPORT=no
+else
   ENABLE_LIBQUADMATH_SUPPORT=yes
 fi
+fi
 
 enable_libquadmath_support=
 if test "${ENABLE_LIBQUADMATH_SUPPORT}" = "no" ; then
@@ -27115,6 +30110,7 @@ fi
 # Check whether we have a __float128 type, depends on enable_libquadmath_support
 
   LIBQUADSPEC=
+  HAVE__FLOAT128=no
 
   if test "x$enable_libquadmath_support" != xno; then
 
@@ -27317,6 +30313,115 @@ $as_echo "$libgfor_cv_have_as_needed" >&
     fi
   fi
   else
+
+    if test "x$have__Float128_libc_support" = xyes; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a usable _Float128 type" >&5
+$as_echo_n "checking whether we have a usable _Float128 type... " >&6; }
+if ${libgfor_cv_have__Float128+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+   if test x$gcc_no_link = xyes; then
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+    _Float128 foo (_Float128 x)
+    {
+
+     _Complex _Float128 z1, z2;
+
+     z1 = x;
+     z2 = x / 7.F128;
+     z2 /= z1;
+
+     return (_Float128) z2;
+    }
+
+    _Float128 bar (_Float128 x)
+    {
+      return x * __builtin_huge_valf128 ();
+    }
+
+int
+main ()
+{
+
+    foo (1.2F128);
+    bar (1.2F128);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+    libgfor_cv_have__Float128=yes
+
+else
+
+    libgfor_cv_have__Float128=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  if test x$gcc_no_link = xyes; then
+  as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+    _Float128 foo (_Float128 x)
+    {
+
+     _Complex _Float128 z1, z2;
+
+     z1 = x;
+     z2 = x / 7.F128;
+     z2 /= z1;
+
+     return (_Float128) z2;
+    }
+
+    _Float128 bar (_Float128 x)
+    {
+      return x * __builtin_huge_valf128 ();
+    }
+
+int
+main ()
+{
+
+    foo (1.2F128);
+    bar (1.2F128);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+    libgfor_cv_have__Float128=yes
+
+else
+
+    libgfor_cv_have__Float128=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have__Float128" >&5
+$as_echo "$libgfor_cv_have__Float128" >&6; }
+
+      if test "x$libgfor_cv_have__Float128" = xyes; then
+
+$as_echo "#define HAVE__FLOAT128 1" >>confdefs.h
+
+	HAVE__FLOAT128=yes
+      fi
+    fi
+
     # for --disable-quadmath
     LIBQUADLIB=
     LIBQUADLIB_DEP=
@@ -27325,6 +30430,7 @@ $as_echo "$libgfor_cv_have_as_needed" >&
 
 
 
+
 
 
 
--- libgfortran/Makefile.in.jj	2022-01-14 21:24:48.371295701 +0100
+++ libgfortran/Makefile.in	2022-06-22 12:49:36.318693557 +0200
@@ -618,6 +618,7 @@ FCFLAGS = @FCFLAGS@
 FGREP = @FGREP@
 FPU_HOST_HEADER = @FPU_HOST_HEADER@
 GREP = @GREP@
+HAVE__FLOAT128 = @HAVE__FLOAT128@
 HWCAP_LDFLAGS = @HWCAP_LDFLAGS@
 IEEE_FLAGS = @IEEE_FLAGS@
 IEEE_SUPPORT = @IEEE_SUPPORT@
@@ -7674,7 +7675,9 @@ ieee_arithmetic.mod: ieee_arithmetic.lo
 @onestep_TRUE@	$(LTCOMPILE) -c -o $@ $^ -combine
 
 kinds.h: $(srcdir)/mk-kinds-h.sh
-	$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' '@LIBGOMP_CHECKED_REAL_KINDS@' '$(FCCOMPILE)' > $@ || rm $@
+	$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' \
+					 '@LIBGOMP_CHECKED_REAL_KINDS@' \
+					 '$(FCCOMPILE)' '@HAVE__FLOAT128@' > $@ || rm $@
 
 kinds.inc: kinds.h $(srcdir)/kinds-override.h
 	cat kinds.h $(srcdir)/kinds-override.h | grep '^#' | grep -v include > $@
--- libgfortran/generated/norm2_r16.c.jj	2022-01-11 23:11:23.847269679 +0100
+++ libgfortran/generated/norm2_r16.c	2022-06-22 14:03:09.399792484 +0200
@@ -27,10 +27,12 @@ see the files COPYING3 and COPYING.RUNTI
 
 
 
-#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_SQRTL)) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_FABSL))
+#if defined (HAVE_GFC_REAL_16) && defined (HAVE_GFC_REAL_16) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) || defined(HAVE_SQRTL)) && (defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) || defined(HAVE_FABSL))
 
 #if defined(GFC_REAL_16_IS_FLOAT128)
 #define MATHFUNC(funcname) funcname ## q
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+#define MATHFUNC(funcname) funcname ## f128
 #else
 #define MATHFUNC(funcname) funcname ## l
 #endif
--- libgfortran/generated/bessel_r16.c.jj	2022-01-11 23:11:23.820270059 +0100
+++ libgfortran/generated/bessel_r16.c	2022-06-22 14:02:54.046994166 +0200
@@ -30,6 +30,8 @@ see the files COPYING3 and COPYING.RUNTI
 
 #if defined(GFC_REAL_16_IS_FLOAT128)
 #define MATHFUNC(funcname) funcname ## q
+#elif defined(GFC_REAL_16_IS__FLOAT128)
+#define MATHFUNC(funcname) funcname ## f128
 #else
 #define MATHFUNC(funcname) funcname ## l
 #endif
@@ -38,7 +40,7 @@ see the files COPYING3 and COPYING.RUNTI
 
 
 
-#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_JNL))
+#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) || defined(HAVE_JNL))
 extern void bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1,
 				     int n2, GFC_REAL_16 x);
 export_proto(bessel_jn_r16);
@@ -104,7 +106,7 @@ bessel_jn_r16 (gfc_array_r16 * const res
 
 #endif
 
-#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(HAVE_YNL))
+#if (defined(GFC_REAL_16_IS_FLOAT128) || defined(GFC_REAL_16_IS__FLOAT128) || defined(HAVE_YNL))
 extern void bessel_yn_r16 (gfc_array_r16 * const restrict ret,
 				     int n1, int n2, GFC_REAL_16 x);
 export_proto(bessel_yn_r16);


	Jakub


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-28 10:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 12:04 [PATCH] fortran, libgfortran: Avoid using libquadmath for glibc 2.26+ Jakub Jelinek
2022-06-23 20:49 ` Harald Anlauf
2022-06-23 21:17   ` Jakub Jelinek
2022-06-24 10:29     ` [PATCH] fortran, libgfortran, v2: " Jakub Jelinek
2022-06-24 21:06       ` Harald Anlauf
2022-06-26 18:45       ` Mikael Morin
2022-06-27  7:54         ` Jakub Jelinek
2022-06-27 11:56           ` Mikael Morin
2022-06-27 13:30             ` [PATCH] fortran, libgfortran, v3: " Jakub Jelinek
2022-06-28  7:01               ` Jakub Jelinek
2022-06-28  8:35               ` Tobias Burnus
2022-06-28 10:57                 ` Jakub Jelinek
2022-06-27 20:54           ` [PATCH] fortran, libgfortran, v2: " Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).