diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2010-10-28 16:34:31 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2010-10-28 16:34:31 (GMT) |
commit | e05528194deb238fa71820c45c425b5953b1b938 (patch) | |
tree | a5948c65388e464a12a7024a515362f76b4ce0cd /test | |
parent | 71bf205c79d20738bf8f5a19907a80e428369d50 (diff) | |
download | hdf5-e05528194deb238fa71820c45c425b5953b1b938.zip hdf5-e05528194deb238fa71820c45c425b5953b1b938.tar.gz hdf5-e05528194deb238fa71820c45c425b5953b1b938.tar.bz2 |
[svn-r19693] Bug 2008 - IBM Power6 Linux uses special conversion algorithms to convert some values from long
double to (unsigned) long and from (unsigned) long to long double. I added tests in configure.in
to detect these algorithms. Before I can figure out them, I disable the tests in dt_arith.c.
Tested on jam, heiwa, amani, IBM Power6 Linux machine in Holland (huygens.sara.nl).
Diffstat (limited to 'test')
-rw-r--r-- | test/dt_arith.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c index b718fa6..3a673fb 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5107,9 +5107,25 @@ run_int_fp_conv(const char *name) nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_INT, H5T_NATIVE_LDOUBLE); nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_UINT, H5T_NATIVE_LDOUBLE); #if H5_SIZEOF_LONG!=H5_SIZEOF_INT +#ifndef H5_LONG_TO_LDOUBLE_SPECIAL nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LONG, H5T_NATIVE_LDOUBLE); nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_LDOUBLE); +#else + { + char str[256]; /*string */ + + sprintf(str, "Testing %s %s -> %s conversions", + name, "(unsigned) long", "long double"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to the special algorithm of hardware conversion."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } #endif +#endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); @@ -5272,9 +5288,25 @@ run_fp_int_conv(const char *name) } #endif /*H5_LDOUBLE_TO_UINT_ACCURATE*/ #if H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 +#ifndef H5_LDOUBLE_TO_LONG_SPECIAL nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULONG); +#else + { + char str[256]; /*string */ + + sprintf(str, "Testing %s %s -> %s conversions", + name, "long double", "(unsigned) long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to the special algorithm of hardware conversion."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } #endif +#endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0 #ifdef H5_LDOUBLE_TO_LLONG_ACCURATE |