mirror of git://gcc.gnu.org/git/gcc.git
re PR libfortran/47716 (libgfortran quadmath_weak.h not found on NetBSD 5.1)
2011-02-15 Tobias Burnus <burnus@net-b.de> PR fortran/47716 PR fortran/47648 * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Use check from libquadmath, which uses more features. * configure: Regenerate. From-SVN: r170200
This commit is contained in:
parent
fc2fa4fb38
commit
69eb61d47a
|
@ -1,3 +1,11 @@
|
||||||
|
2011-02-15 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
|
PR fortran/47716
|
||||||
|
PR fortran/47648
|
||||||
|
* acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Use check from
|
||||||
|
libquadmath, which uses more features.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2011-02-14 Jakub Jelinek <jakub@redhat.com>
|
2011-02-14 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR fortran/47642
|
PR fortran/47642
|
||||||
|
|
|
@ -284,24 +284,33 @@ AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether we have a usable __float128 type],
|
AC_CACHE_CHECK([whether we have a usable __float128 type],
|
||||||
libgfor_cv_have_float128, [
|
libgfor_cv_have_float128, [
|
||||||
AC_TRY_LINK([
|
GCC_TRY_COMPILE_OR_LINK([
|
||||||
/* no header */
|
|
||||||
],[
|
|
||||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||||
|
|
||||||
__float128 x;
|
__float128 foo (__float128 x)
|
||||||
x = __builtin_huge_valq() - 2.e1000Q;
|
{
|
||||||
|
|
||||||
__complex128 z1, z2;
|
__complex128 z1, z2;
|
||||||
z1 = x;
|
|
||||||
z2 = 2.Q;
|
|
||||||
|
|
||||||
z1 /= z2;
|
z1 = x;
|
||||||
z1 /= 7.Q;
|
z2 = x / 7.Q;
|
||||||
],
|
z2 /= z1;
|
||||||
libgfor_cv_have_float128=yes,
|
|
||||||
libgfor_cv_have_float128=no)
|
return (__float128) z2;
|
||||||
])
|
}
|
||||||
|
|
||||||
|
__float128 bar (__float128 x)
|
||||||
|
{
|
||||||
|
return x * __builtin_huge_valq ();
|
||||||
|
}
|
||||||
|
],[
|
||||||
|
foo (1.2Q);
|
||||||
|
bar (1.2Q);
|
||||||
|
],[
|
||||||
|
libgfor_cv_have_float128=yes
|
||||||
|
],[
|
||||||
|
libgfor_cv_have_float128=no
|
||||||
|
])])
|
||||||
|
|
||||||
if test "x$libgfor_cv_have_float128" = xyes; then
|
if test "x$libgfor_cv_have_float128" = xyes; then
|
||||||
AC_DEFINE(HAVE_FLOAT128, 1, [Define if have a usable __float128 type.])
|
AC_DEFINE(HAVE_FLOAT128, 1, [Define if have a usable __float128 type.])
|
||||||
|
|
|
@ -25076,41 +25076,98 @@ if test "${libgfor_cv_have_float128+set}" = set; then :
|
||||||
else
|
else
|
||||||
|
|
||||||
if test x$gcc_no_link = xyes; then
|
if test x$gcc_no_link = xyes; then
|
||||||
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
fi
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
/* no header */
|
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||||
|
|
||||||
|
__float128 foo (__float128 x)
|
||||||
|
{
|
||||||
|
|
||||||
|
__complex128 z1, z2;
|
||||||
|
|
||||||
|
z1 = x;
|
||||||
|
z2 = x / 7.Q;
|
||||||
|
z2 /= z1;
|
||||||
|
|
||||||
|
return (__float128) z2;
|
||||||
|
}
|
||||||
|
|
||||||
|
__float128 bar (__float128 x)
|
||||||
|
{
|
||||||
|
return x * __builtin_huge_valq ();
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
foo (1.2Q);
|
||||||
|
bar (1.2Q);
|
||||||
|
|
||||||
|
;
|
||||||
|
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. */
|
||||||
|
|
||||||
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
typedef _Complex float __attribute__((mode(TC))) __complex128;
|
||||||
|
|
||||||
__float128 x;
|
__float128 foo (__float128 x)
|
||||||
x = __builtin_huge_valq() - 2.e1000Q;
|
{
|
||||||
|
|
||||||
__complex128 z1, z2;
|
__complex128 z1, z2;
|
||||||
z1 = x;
|
|
||||||
z2 = 2.Q;
|
|
||||||
|
|
||||||
z1 /= z2;
|
z1 = x;
|
||||||
z1 /= 7.Q;
|
z2 = x / 7.Q;
|
||||||
|
z2 /= z1;
|
||||||
|
|
||||||
|
return (__float128) z2;
|
||||||
|
}
|
||||||
|
|
||||||
|
__float128 bar (__float128 x)
|
||||||
|
{
|
||||||
|
return x * __builtin_huge_valq ();
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
foo (1.2Q);
|
||||||
|
bar (1.2Q);
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
|
||||||
libgfor_cv_have_float128=yes
|
libgfor_cv_have_float128=yes
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
libgfor_cv_have_float128=no
|
libgfor_cv_have_float128=no
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_float128" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_float128" >&5
|
||||||
$as_echo "$libgfor_cv_have_float128" >&6; }
|
$as_echo "$libgfor_cv_have_float128" >&6; }
|
||||||
|
|
Loading…
Reference in New Issue