X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libgfortran%2Fconfigure;h=9d3c891ca80ffd56bc9e26222d5d804616e68a89;hp=42f72b5019bfc4e806dc55ed328553cbb9bf48dd;hb=9af9660ca689894fe51b696a63bfe81713bd4cd6;hpb=18669cea5ad136747b93554568ba8f5eedd69584 diff --git a/libgfortran/configure b/libgfortran/configure index 42f72b5019b..9d3c891ca80 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25075,42 +25075,99 @@ if test "${libgfor_cv_have_float128+set}" = set; 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 + if test x$gcc_no_link = xyes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 main () { - typedef _Complex float __attribute__((mode(TC))) __complex128; + foo (1.2Q); + bar (1.2Q); - __float128 x; - x = __builtin_huge_valq() - 2.e1000Q; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - __complex128 z1, z2; - z1 = x; - z2 = 2.Q; + libgfor_cv_have_float128=yes - z1 /= z2; - z1 /= 7.Q; +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; + + __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 +main () +{ + + foo (1.2Q); + bar (1.2Q); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - libgfor_cv_have_float128=yes + + libgfor_cv_have_float128=yes + else - libgfor_cv_have_float128=no + + 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; }