mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r26511] Description:
Remove the FP_TO_INTEGER_OVERFLOW_WORKS macro/define, which is for working around bugs in the Cray X1 compiler and is no longer supported. Tested on: MacOSX/64 10.10.2 (amazon) w/serial & parallel (h5committest not required on this branch)
This commit is contained in:
parent
57393bc048
commit
4f18b095d8
@ -251,14 +251,6 @@ ENDMACRO (H5MiscConversionTest)
|
||||
# Check various conversion capabilities
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Set the flag to indicate that the machine can handle overflow converting
|
||||
# all floating-point to all integer types.
|
||||
# (This flag should be set for all machines, except for Cray X1 where
|
||||
# floating exception is generated when the floating-point value is greater
|
||||
# than the maximal integer value).
|
||||
#
|
||||
H5ConversionTests (H5_FP_TO_INTEGER_OVERFLOW_WORKS "Checking IF overflows normally converting floating-point to integer values")
|
||||
# ----------------------------------------------------------------------
|
||||
# Set the flag to indicate that the machine is using a special algorithm to convert
|
||||
# 'long double' to '(unsigned) long' values. (This flag should only be set for
|
||||
|
@ -1,18 +1,3 @@
|
||||
#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS_TEST
|
||||
|
||||
int main(void)
|
||||
{
|
||||
float f = 2147483648.0f;
|
||||
int i;
|
||||
|
||||
i = (int)f;
|
||||
|
||||
done:
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
|
||||
|
||||
int main(void)
|
||||
|
@ -70,10 +70,6 @@
|
||||
/* As FC_FUNC, but for C identifiers containing underscores. */
|
||||
#define @H5_FC_FUNC_@
|
||||
|
||||
/* Define if your system can handle overflow converting floating-point to
|
||||
integer values. */
|
||||
#cmakedefine H5_FP_TO_INTEGER_OVERFLOW_WORKS @H5_FP_TO_INTEGER_OVERFLOW_WORKS@
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
#cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@
|
||||
|
||||
|
31
configure.ac
31
configure.ac
@ -2408,37 +2408,6 @@ case "`uname`" in
|
||||
;;
|
||||
esac
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set the flag to indicate that the machine can handle overflow converting
|
||||
## all floating-point to all integer types.
|
||||
## (This flag should be set for all machines, except for Cray X1 where
|
||||
## floating exception is generated when the floating-point value is greater
|
||||
## than the maximal integer value).
|
||||
##
|
||||
AC_MSG_CHECKING([if overflows normally converting floating-point to integer values])
|
||||
|
||||
AC_CACHE_VAL([hdf5_cv_fp_to_integer_overflow_works],
|
||||
[AC_TRY_RUN([
|
||||
int main(void)
|
||||
{
|
||||
float f = 2147483648.0f;
|
||||
int i;
|
||||
|
||||
i = (int)f;
|
||||
|
||||
done:
|
||||
exit(0);
|
||||
}
|
||||
], [hdf5_cv_fp_to_integer_overflow_works=yes], [hdf5_cv_fp_to_integer_overflow_works=no],)])
|
||||
|
||||
if test ${hdf5_cv_fp_to_integer_overflow_works} = "yes"; then
|
||||
AC_DEFINE([FP_TO_INTEGER_OVERFLOW_WORKS], [1],
|
||||
[Define if your system can handle overflow converting floating-point to integer values.])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set the flag to indicate that the machine is using a special algorithm to convert
|
||||
## 'long double' to '(unsigned) long' values. (This flag should only be set for
|
||||
|
@ -5083,7 +5083,6 @@ static int
|
||||
run_fp_int_conv(const char *name)
|
||||
{
|
||||
int nerrors = 0;
|
||||
#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS
|
||||
int test_values;
|
||||
|
||||
#ifdef H5_VMS
|
||||
@ -5198,23 +5197,6 @@ run_fp_int_conv(const char *name)
|
||||
#ifndef H5_VMS
|
||||
} /* end for */
|
||||
#endif /* H5_VMS */
|
||||
#else /* H5_FP_TO_INTEGER_OVERFLOW_WORKS */
|
||||
/* For Cray X1, the compiler generates floating exception when the
|
||||
* conversion overflows. So disable all of the conversions from
|
||||
* floating-point numbers to integers.
|
||||
*/
|
||||
char str[256]; /*string */
|
||||
|
||||
HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
|
||||
name, "all floating-point numbers", "all integers");
|
||||
printf("%-70s", str);
|
||||
SKIPPED();
|
||||
#if H5_SIZEOF_LONG_DOUBLE!=0
|
||||
HDputs(" Test skipped due to hardware conversion error.");
|
||||
#else
|
||||
HDputs(" Test skipped due to disbaled long double.");
|
||||
#endif
|
||||
#endif /* H5_FP_TO_INTEGER_OVERFLOW_WORKS */
|
||||
|
||||
return nerrors;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user