re PR libfortran/21950 (All gfortran execution tests fail on Tru64 UNIX V4.0F: scalbn unresolved)

PR libfortran/21950
	* intrinsics/c99_functions.c (scalbn): Provide fallback
	implementation for scalbn.
	* c99_protos.h: Prototype for scalbn.
	* configure.ac: Add check for scalbn.
	* configure: Regenerate.
	* config.h.in: Regenerate.

From-SVN: r100974
This commit is contained in:
François-Xavier Coudert 2005-06-15 08:40:35 +00:00
parent c4eacf9907
commit ae973d6ae8
6 changed files with 107 additions and 4 deletions

View File

@ -1,3 +1,13 @@
2005-06-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/21950
* intrinsics/c99_functions.c (scalbn): Provide fallback
implementation for scalbn.
* c99_protos.h: Prototype for scalbn.
* configure.ac: Add check for scalbn.
* configure: Regenerate.
* config.h.in: Regenerate.
2005-06-14 Thomas Koenig <Thomas.Koenig@online.de>
* intrinsics/eoshift0.c: Removed prototype for eoshift0.
@ -47,10 +57,10 @@
For complex, call internal_pack_c4 if size==8 and
internal_pack_c8 if size==16.
* runtime/in_unpack_generic.c: For real, integer and logical
call internal_unpack_4 if size==4 and internal_unpack_8 if
size==8.
For complex, call internal_unpack_c4 if size==8 and
internal_unpack_c8 if size==16.
call internal_unpack_4 if size==4 and internal_unpack_8 if
size==8.
For complex, call internal_unpack_c4 if size==8 and
internal_unpack_c8 if size==16.
* generated/in_pack_i4.c: Regenerated.
* generated/in_pack_i8.c: Regenerated.
* generated/in_unpack_i4.c: Regenerated.

View File

@ -89,6 +89,10 @@ extern float logf(float);
extern float log10f(float);
#endif
#ifndef HAVE_SCALBN
extern double scalbn(double, int);
#endif
#ifndef HAVE_SCALBNF
extern float scalbnf(float, int);
#endif

View File

@ -168,6 +168,9 @@
/* libm includes roundf */
#undef HAVE_ROUNDF
/* libm includes scalbn */
#undef HAVE_SCALBN
/* libm includes scalbnf */
#undef HAVE_SCALBNF

77
libgfortran/configure vendored
View File

@ -9401,6 +9401,83 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for scalbn in -lm" >&5
echo $ECHO_N "checking for scalbn in -lm... $ECHO_C" >&6
if test "${ac_cv_lib_m_scalbn+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
if test x$gcc_no_link = xyes; then
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char scalbn ();
int
main ()
{
scalbn ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_m_scalbn=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_m_scalbn=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_m_scalbn" >&5
echo "${ECHO_T}$ac_cv_lib_m_scalbn" >&6
if test $ac_cv_lib_m_scalbn = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SCALBN 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for sinf in -lm" >&5
echo $ECHO_N "checking for sinf in -lm... $ECHO_C" >&6
if test "${ac_cv_lib_m_sinf+set}" = set; then

View File

@ -201,6 +201,7 @@ AC_CHECK_LIB([m],[powf],[AC_DEFINE([HAVE_POWF],[1],[libm includes powf])])
AC_CHECK_LIB([m],[round],[AC_DEFINE([HAVE_ROUND],[1],[libm includes round])])
AC_CHECK_LIB([m],[roundf],[AC_DEFINE([HAVE_ROUNDF],[1],[libm includes roundf])])
AC_CHECK_LIB([m],[scalbnf],[AC_DEFINE([HAVE_SCALBNF],[1],[libm includes scalbnf])])
AC_CHECK_LIB([m],[scalbn],[AC_DEFINE([HAVE_SCALBN],[1],[libm includes scalbn])])
AC_CHECK_LIB([m],[sinf],[AC_DEFINE([HAVE_SINF],[1],[libm includes sinf])])
AC_CHECK_LIB([m],[sinhf],[AC_DEFINE([HAVE_SINHF],[1],[libm includes sinhf])])
AC_CHECK_LIB([m],[sqrtf],[AC_DEFINE([HAVE_SQRTF],[1],[libm includes sqrtf])])

View File

@ -154,6 +154,14 @@ log10f(float x)
}
#endif
#ifndef HAVE_SCALBN
double
scalbn(double x, int y)
{
return x * pow(FLT_RADIX, y);
}
#endif
#ifndef HAVE_SCALBNF
float
scalbnf(float x, int y)