diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2006-06-23 22:11:12 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2006-06-23 22:11:12 (GMT) |
commit | 4dfad81062f0b195ee9fd10f0b4e5ba2f6056aeb (patch) | |
tree | dd1beab639cb485e8c4b785112f00081c4d7d321 /test/dt_arith.c | |
parent | 842895a79950c2d43958831991a97802bcd58431 (diff) | |
download | hdf5-4dfad81062f0b195ee9fd10f0b4e5ba2f6056aeb.zip hdf5-4dfad81062f0b195ee9fd10f0b4e5ba2f6056aeb.tar.gz hdf5-4dfad81062f0b195ee9fd10f0b4e5ba2f6056aeb.tar.bz2 |
[svn-r12435] Purpose: Bug fix
Description: Mac OS 10.4 on PowerPC chip has some errors to convert (unsigned)
long long to long double. When the bit sequences are 0x003ff..., 0x007fff...,
0x00ffff..., 0x01ffff..., 0x7fffff..., the converted values are twice as big
as they should be.
Solution: Detect the error in configure and disable the compiler conversion
and test case.
Platforms tested: h5committest, Mac OS 10.4, and fuss.
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r-- | test/dt_arith.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c index 5569446..dc12696 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -4945,10 +4945,22 @@ run_int_fp_conv(const char *name) nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULONG, H5T_NATIVE_LDOUBLE); #endif #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); -#if H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + sprintf(str, "Testing %s %s -> %s conversions", + name, "long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler error in handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#if H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION */ +#else /* H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ @@ -4958,7 +4970,7 @@ run_int_fp_conv(const char *name) SKIPPED(); HDputs(" Test skipped due to compiler not handling conversion."); } -#endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION */ +#endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif #else /*H5_INTEGER_TO_LDOUBLE_ACCURATE*/ |