summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-01-14 20:15:34 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-01-14 20:15:34 (GMT)
commit105bee4ead610d183af62e08b4f7c219ba0ea6a9 (patch)
tree5f2525c1045a9dfa3f8731b84bedfa0b80ad3e4e /test
parent23130b569c3846a1fd098841bb2f9912dd9040de (diff)
downloadhdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.zip
hdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.tar.gz
hdf5-105bee4ead610d183af62e08b4f7c219ba0ea6a9.tar.bz2
[svn-r9826] Purpose: Bug fix
Description: Intel compiler on Linux has some problem to convert long double to unsigned int correctly. Solution: Detect the problem in configure and define a macro to skip this test if it happens. Platforms tested: eirene and fuss. Simple change.
Diffstat (limited to 'test')
-rw-r--r--test/dtypes.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index a60d968..4c46001 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6396,10 +6396,8 @@ run_int_float_conv(const char *name)
#endif
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
nerrors += test_conv_int_float(name, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE);
-#ifdef H5_ULLONG_TO_FP_CAST_WORKS
-#ifdef H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
+#ifdef H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS
nerrors += test_conv_int_float(name, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE);
-#endif /*H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS*/
#else /* H5_ULLONG_TO_FP_CAST_WORKS */
{
char str[256]; /*hello string */
@@ -6517,7 +6515,19 @@ run_float_int_conv(const char *name)
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SHORT);
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_USHORT);
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_INT);
+#if H5_CV_LDOUBLE_TO_UINT_WORKS
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UINT);
+#else /*H5_CV_LDOUBLE_TO_UINT_WORKS*/
+ {
+ char str[256]; /*string */
+
+ sprintf(str, "Testing random %s %s -> %s conversions",
+ name, "long double", "unsigned int");
+ printf("%-70s", str);
+ SKIPPED();
+ HDputs(" Test skipped due to hardware conversion error.");
+ }
+#endif /*H5_CV_LDOUBLE_TO_UINT_WORKS*/
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG);
nerrors += test_conv_int_float(name, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULONG);