fi
])
-dnl Check whether we have a __float128 type
+dnl Check whether we have a __float128 and _Float128 type
AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
LIBQUADSPEC=
LIBQUADLIB=
GCC_TRY_COMPILE_OR_LINK([
_Float128 foo (_Float128 x)
{
-
_Complex _Float128 z1, z2;
z1 = x;
{
return x * __builtin_huge_valf128 ();
}
+
+ __float128 baz (__float128 x)
+ {
+ return x * __builtin_huge_valf128 ();
+ }
],[
foo (1.2F128);
bar (1.2F128);
+ baz (1.2F128);
foo (1.2Q);
bar (1.2Q);
+ baz (1.2Q);
],[
libgfor_cv_have_float128=yes
],[
if test "x$USE_IEC_60559" = xyes; then
AC_DEFINE(USE_IEC_60559, 1, [Define if IEC 60559 *f128 APIs should be used for _Float128.])
fi
- AC_DEFINE(HAVE_FLOAT128, 1, [Define if have a usable _Float128 type.])
+ AC_DEFINE(HAVE_FLOAT128, 1, [Define if target has usable _Float128 and __float128 types.])
dnl Check whether -Wl,--as-needed resp. -Wl,-zignore is supported
dnl
/* Define to 1 if you have the <fenv.h> header file. */
#undef HAVE_FENV_H
-/* Define if have a usable _Float128 type. */
+/* Define if target has usable _Float128 and __float128 types. */
#undef HAVE_FLOAT128
/* Define to 1 if you have the <floatingpoint.h> header file. */
_Float128 foo (_Float128 x)
{
-
_Complex _Float128 z1, z2;
z1 = x;
return x * __builtin_huge_valf128 ();
}
+ __float128 baz (__float128 x)
+ {
+ return x * __builtin_huge_valf128 ();
+ }
+
int
main ()
{
foo (1.2F128);
bar (1.2F128);
+ baz (1.2F128);
foo (1.2Q);
bar (1.2Q);
+ baz (1.2Q);
;
return 0;
_Float128 foo (_Float128 x)
{
-
_Complex _Float128 z1, z2;
z1 = x;
return x * __builtin_huge_valf128 ();
}
+ __float128 baz (__float128 x)
+ {
+ return x * __builtin_huge_valf128 ();
+ }
+
int
main ()
{
foo (1.2F128);
bar (1.2F128);
+ baz (1.2F128);
foo (1.2Q);
bar (1.2Q);
+ baz (1.2Q);
;
return 0;