summaryrefslogtreecommitdiffstats
path: root/test/dt_arith.c
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r27770] Bring r27428 from trunkDana Robinson2015-09-141-16/+74
| | | | | | | | | | | | Reverts the following changes: 27737, 27742, 27743 These involve double conversions that cause problems with the IBM XL compiler. Tested on: h5committest ostrich w/ XL C compiler
* [svn-r27743] Merge of r26625 from the trunkDana Robinson2015-09-101-24/+0
| | | | | | | Remove the LLONG_TO_LDOUBLE_CORRECT macro/define, it's working around bugs in very old SGI/FreeBSD/Windows compilers. Tested on: jam (minor change that has baked in the trunk for months)
* [svn-r27742] Merge of r26623 from the trunkDana Robinson2015-09-101-32/+0
| | | | | | | Remove the LDOUBLE_TO_LLONG_ACCURATE macro/define, it's working around bugs in older SGI, HP/UX, MacOSX and Windows .NET 2003 compilers. Tested on: jam (minor change that has baked in the trunk for months)
* [svn-r27741] Merge of r26606 from the trunkDana Robinson2015-09-101-4/+0
| | | | | | | Remove HW_FP_TO_LLONG_NOT_WORKS macro/define, it was only addressing Windows .NET 2003 compiler issues. Fixes HDFFV-9189. Tested on: jam (minor change that has baked in the trunk for months)
* [svn-r27736] Merge of r26605 from trunkDana Robinson2015-09-101-53/+0
| | | | | | | Remove CONVERT_DENORMAL_FLOAT, since this was only set in obsolete configure files. Tested on: jam (has baked in the trunk for over 6 months)
* [svn-r27733] Merge of r26602 from trunkDana Robinson2015-09-101-43/+0
| | | | | | | | Remove the H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS and H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS macros/defines, as they are no longer used by supported platforms. Tested on: jam (has baked in the trunk for over 6 months)
* [svn-r27730] Merge r26618 from trunkDana Robinson2015-09-091-18/+0
| | | | | | | 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: h5committest
* [svn-r27685] Merge of r27572 from trunkDana Robinson2015-09-061-156/+8
| | | | | | | | | | Remove all VMS-specific code from the library. The exception is the VMS floating-point tests since those are special as VMS floats are odd. Those files will be considered separately. Fixes HDFFV-9495 Tested on: h5committest
* [svn-r27165] Merge 27133 & 27158 from trunk:Mohamad Chaarawi2015-06-081-3/+3
| | | | | | | | | - Add a new attribute function characterstic for format: * H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) - Rename UNUSED attribute characterstic to H5_ATTR_UNUSED. - Rename NORETURN attribute characterstic to H5_ATTR_NORETURN tested with h5committest.
* [svn-r26638] Description:Quincey Koziol2015-03-281-21/+3
| | | | | | | | | | | | | Bring r26598 from trunk to 1.8 branch: Bring r26501 from the autotools_rework branch to the trunk: Remove ULLONG_TO_LDOUBLE_PRECISION macro/define, as it's targeting bugs in the FreeBSD and Cygwin compilers. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days)
* [svn-r26636] Description:Quincey Koziol2015-03-281-27/+3
| | | | | | | | | | | | | Bring r26596 from trunk to 1.8 branch: Bring r26499 from autotools_rework branch to trunk: Remove ULLONG_TO_FP_CAST_WORKS macro/define, as it only applies to older platforms we aren't supporting any longer. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days)
* [svn-r26630] Description:Quincey Koziol2015-03-271-16/+0
| | | | | | | | | | | | | Bring r26595 from trunk to 1.8 branch: Bring r26494 from autotools_rework branch back to trunk: Remove the LDOUBLE_TO_UINT_ACCURATE macro/define, it was addressing problems with older Intel compilers on Linux that are no longer supported. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days)
* [svn-r26628] Description:Quincey Koziol2015-03-271-21/+3
| | | | | | | | | | | | | | Bring r26591 from trunk to 1.8 branch: Bring r26492 from autotools_rework branch back to trunk: Remove the FP_TO_ULLONG_ACCURATE and FP_TO_ULLONG_RIGHT_MAXIMUM macros/defines, which were added to address problems with older PGI compilers and HP-UX systems and are no longer supported. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel) (Daily tested for 2+ days on trunk)
* [svn-r26624] Description:Quincey Koziol2015-03-271-2/+0
| | | | | | | | | | | | | Bring r26584 from trunk to 1.8 branch: Bring r26485 from the autotools_rework branch to the trunk: Remove the ULONG_TO_FLOAT_ACCURATE macro/define, we no longer support the Sandia system where it was necessary. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days)
* [svn-r26588] Description:Quincey Koziol2015-03-251-17/+0
| | | | | | | | | | | | | Bring r26560 from trunk 1.8 branch: Bring r26483 from autotools_rework branch back to trunk: Remove INTEGER_TO_LDOUBLE_ACCURATE macro/define - we no longer support SGI systems. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (daily tested for 2+ days)
* [svn-r26585] Description:Quincey Koziol2015-03-251-16/+0
| | | | | | | | | | | | Bring r26495 from trunk to 1.8 branch: Bring r26258 from the autotools_rework branch to the trunk - remove the LDOUBLE_TO_INTEGER_WORKS macro/define, which was addressing issues with SGI systems that are no longer supported. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (daily tested on trunk for >1 week)
* [svn-r26561] Description:Quincey Koziol2015-03-241-3/+3
| | | | | | | | | | | | Bring r26491 from trunk to 1.8 branch: Bring r26257 from autotools_rework branch back to the trunk - removes the LDOUBLE_TO_INTEGER_ACCURATE macro/define, which was addressing problems with SGI systems and is no longer supported. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel Daily tested on branch for >2 weeks.
* [svn-r26398] Merges r26333 from trunkDana Robinson2015-03-091-2/+2
| | | | | | | | | | | | | | | | Eliminates gcc warnings due to -Wunsuffixed-float-constants. - Adds 'F' suffixes for most float constants. - A few constants MUST be of type double. These now receive the long double L suffix and are then cast to double. I do this via a new H5_DOUBLE() macro which was added to H5private.h. - Additionally, some 1.8-specific float suffixes were added. Fixes: HDFFV-9148 Tested on: h5committest
* [svn-r25497] Description:Quincey Koziol2014-07-301-32/+64
| | | | | | | | | | Merge changes that correspond to the 64-bit ID changes (without the actual switch to 64-bit IDs) to the 1.8 release branch. (Plus a few minor cleanups and alignments with the trunk that aren't on the branch) Tested on: Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN (h5committested on branch already for a week)
* [svn-r24810] Description:Quincey Koziol2014-03-171-85/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r24803 & r24804 from trunk to 1.8 branch: r24804: Brought changes from Coverity branch back to trunk, and cleaned up misc. other warnings & formatting issues: r20833: Fixed Coverity 667 and 668 with real integer overflow tests this time. r20834: Use HDstrncpy and HDstrncat. --gh r20835: Change to use strncpy - use base_len + 1 for line 156, use HDstrlen(path) + 1 for line 159 r20836: Fixed coverity 585 by casting output of fgetc() to a char. r20837: Changed sprintf calls to snprintf with size 1 less than the allocated buffer to address coverity issue #967. r24803: Rename GCC_DIAG_OFF/ON macros to H5_GCC_DIAG_OFF/ON and move from src/H5private.h to src/H5public.h. Wrap typedef of hsize_t and hssize_t in DIAG_OFF(long-long) macros. Clean up a bunch of "macro '-' is unused" warnings. Tested on: Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel (too minor to require h5committest)
* [svn-r24231] Issue 1264: CYGWIN had long double rounding problem from ↵Raymond Lu2013-09-301-3/+3
| | | | | | | | unsigned long long. Allen confirmed the problem is gone. So I took out the macro CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM. It skipped the test related to this issue. Tested with h5committest.
* [svn-r24121] OpenVMS converted the value of zero in char or short to ↵Raymond Lu2013-09-101-0/+23
| | | | | | | | negative zero in long double. I made it warning instead of failure. Tested on jam and Boeing OpenVMS - simple change.
* [svn-r24074] I took out the soft conversion functions H5T__conv_i_f and ↵Raymond Lu2013-08-261-0/+16
| | | | | | | | | H5T__conv_f_i for OpenVMS because they have problem to convert between integers and floating numbers. I also commented out the test case in dt_arith.c for OpenVMS. Tested on jam - simple change.
* [svn-r24012] Description:Quincey Koziol2013-08-151-0/+4
| | | | | | | | | | Bring r24011 from trunk to 1.8 branch: Clean up a few warnings Tested on: Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest)
* [svn-r22647] Description:Quincey Koziol2012-08-091-3/+3
| | | | | | | | | | | Bring r22646 from trunk to 1.8 branch: Changes resulting from Klocwork static analysis tool, from Mark Miller @ LLNL (miller86@llnl.gov). Tested on: Mac OS X/64 10.7.4 (amazon) w/debug, C++ & FORTRAN, using gcc 4.7.x (too minor to require h5committest)
* [svn-r22291] Description:Quincey Koziol2012-04-171-57/+57
| | | | | | | | | | Bring r22287 from trunk to 1.8 branch: Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
* [svn-r21343] Issue 7674 - clang compiler with -fcatch-undefined-behavior ↵Raymond Lu2011-08-311-6/+12
| | | | | | | | | -ftrapv discovered several problems in the test suite. One of them is in the INIT_INTEGER macro definition in dt_arith.c. It complained about line 150 where it tried to subtract 1 from the negative minimal value of "int", causing it to overflow (or underflow). So I revised the code to avoid it. Tested on jam and Mac OS Lion with CLANG compiler. But I tested the same change for the trunk with h5committest.
* [svn-r19693] Bug 2008 - IBM Power6 Linux uses special conversion algorithms ↵Raymond Lu2010-10-281-0/+32
| | | | | | | | | 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).
* [svn-r19521] Move 'int nerrors = 0' declaration out of '#ifdef' block to ↵Allen Byrne2010-10-051-1/+1
| | | | | | match return. Bring r19520 back from trunk
* [svn-r19274] Description:Quincey Koziol2010-08-201-119/+296
| | | | | | | | | | | | | | | | | | | | Bring r19272 & 19273 from trunk to 1.8 branch: Close out various resource leaks and usages of uninitialized memory that were flagged by valgrind. [There's still some more valgrind warnings, but it's better now... :-/ ] Also clean up warnings and code formatting. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Mac OS X/32 10.6.4 (amazon) in debug mode Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
* [svn-r18706] I changed the macro H5_CYGWIN (checked in with round 18696) to ↵Raymond Lu2010-05-051-3/+3
| | | | | | H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM to make it more descriptive. I tested on jam and Cygwin.
* [svn-r18696] I added a macro definition if the system is Cygwin in ↵Raymond Lu2010-05-041-3/+3
| | | | | | | | | | configure.in. This macro is used to skip the data conversion test from unsigned long long to long double. The GCC on Cygwin seems to have rounding problem when doing conversion from unsigned long long to long double (Please bug #1813). Tested on jam. I'll test it on Cygwin after this checkin.
* [svn-r18628] Description:Quincey Koziol2010-04-251-5/+6
| | | | | | | | | | | | Bring r18627 from trunk to 1.8 branch: More progress toward addressing Bz#1398: add 'volatile' keyword to floating- point types when detecting their properties. Also, minor code formatting cleanups. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug) (h5committested on trunk)
* [svn-r18160] Description:Quincey Koziol2010-01-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r18159 from trunk to 1.8 branch: Bring Coverity fixes from 1/22/10 session to trunk: r18137: 219: Initialized hid_t to -1 and added close to error block. 189-191: Initialized line to NULL and added free line, and close fp to error block. r18138: 19: Moved code block for printing that the number of enums is empty to the error block. (Would never have been executed otherwise) r18139: Fix coverity item 58. Moved code related to displaying the parent of a repeated group to the else(isRoot) section, as the root group has no parent. r18140: 218: Initialized ret_value variable to -1. Because of throw Exception in default case of switch, the coverity problem would not have executed anyway. Good pratice is to initialize variables. r18141: Fix coverity item 92. Added code to H5E_register_class to free cls in case of an error. r18142: Fix coverity item 91. Added code to H5E_create_msg to free msg in case of an error. r18143: fixed issue 14, took away "if" and used #ifndef_xxx. r18144: Fix coverity item 110. Added code to H5Eget_minor to free msg_str in case of an error. r18145: fixed coverity #18 removed "aligned", it is always NULL. r18146: Fix coverity item 109. Added code to H5Eget_major to free msg_str in case of an error. r18147: Fixed coverity #81 and #82, Check for bad pointer(s), but can't issue error, just leave r18148: Fix coverity item 97. Added code to H5FD_fapl_open to free copied_driver_info in case of an error. r18149: Fix coverity item 96. Added code to H5FD_dxpl_open to free copied_driver_info in case of an error. r18150: Fix Coverity issue #29: Protected cache_ptr dereferences with "if(pass)" block r18151: Fix coverity item 93. Added code to H5FL_fac_init to free factory and new_node in case of an error. r18152: Fix coverity items 98 and 99. Added code free allocated space in case of error. r18155: 124: Freed head pointer before jumping to done. There was no error handling block and normal exit used same path out. 120-123: Freed list of lists in error handling block. r18156: Fix coverity issues 179, 180, 181, 182, 183, 184, 186, 320, 407. These were resource leak issues where allocated memory was not freed, generally in the case of tests that failed. Tested on: Mac OS X/32 10.6.2 (amazon) debug & production
* [svn-r18096] Description:Quincey Koziol2010-01-081-122/+107
| | | | | | | Correct Coverity issue #17 by refactoring test to remove dead code. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug
* [svn-r17982] Description:Quincey Koziol2009-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r17980 from trunk to 1.8 branch: Bring Coverity changes into the trunk: (also other minor cleanups) r17955: Fix Coverity item 24. Add missing error condition to H5AC_ext_config_2_int_config. r17956: Fix Coverity item 24. Improve error checking in H5A_compact_build_table_cb. r17957: Fix Coverity item 150. Fix warning in H5A_compact_build_table_cb. r17958: Fix Coverity item 117. Fix error handling in H5B_shared_new. r17959: Fix Coverity item 209. Added an assertion for leaf->shared in H5B2_cache_leaf_dest. r17960: Fix Coverity item 208. Added an assertion for internal->shared in H5B2_cache_internal_dest. r17961: Fix Coverity item 89. Reworked the code to avoid array overrun in H5C__autoadjust__ageout__insert_new_marker. r17962: Fix for coverity Resource_leak 195,203,204,205. r17963: Fix Coverity item 44. Prevented potential NULL dereference in H5D_btree_debug. r17964: Fix Coverity issues #197, 198 & 199: memory not being released. (Also clean up other resource leaks in nearby and/or similar code). r17965: Fix Coverity issue #151: release resources on error r17966: Fix Coverity issue #187: Remove leftover code remnant from prior bugfix which was causing resource leak of open files. r17967: Fixed Coverity issues # 193 & 194. Removed unnecessary memory allocation and added comparison of length of path parameter to the size of the destination buffer in h5import.h/h5import.c. r17968: Fix Coverity item 144. Fixed memory leak on error in H5D_chunk_copy. r17969: Fix for coverity Resource_leak #196. r17970: Coverity 167-173: Initialized pointer of buffers. In error handling, closed types and free memory. Tested on: FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode (h5committested on trunk)
* [svn-r17406] I added a condition check for the conversion from unsigned to ↵Raymond Lu2009-08-211-0/+2
| | | | | | | | | float. When the configure detects the conversion working, a macro is set. If there's problem with this conversion like Pathscale compiler, skip the test. Tested on jam. Need to verify it on pathscale machine.
* [svn-r17396] Added a comment to explain what "dst" and "ans" are when errors ↵Raymond Lu2009-08-201-0/+3
| | | | | | happen. Tested on jam - simple change.
* [svn-r16566] Description:Quincey Koziol2009-03-111-12/+8
| | | | | | | | Bring r16560 back from trunk. Tested on: Mac OS X/32 10.5.6 (amazon) debug & production (Following up with tests on more platforms)
* [svn-r16490] Fixed bug #1459 by eliminating the macro long_long and ↵Allen Byrne2009-02-181-111/+111
| | | | | | | | | replacing all instances with long long. Tested: h5comittest fedora 10 x64 XP32, VNET
* [svn-r14160] Description:Quincey Koziol2007-09-271-34/+20
| | | | | | | | | | | | | | | | Make H5Topen versioned, and add regression test for H5Topen1. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14156] Description:Quincey Koziol2007-09-261-20/+20
| | | | | | | | | | | | | | | | Add API versioning to H5Tcommit() Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14136] Description:Quincey Koziol2007-09-061-2/+2
| | | | | | | | | | | | | | Move H5Gget_num_objs() and several minor macros, etc. to deprecated symbols section, replacing it with H5Gget_info(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
* [svn-r13798] Description:Quincey Koziol2007-05-231-3/+3
| | | | | | | Clean up compiler warnings Tested on: Mac OS X/32 10.4.9 (amazon)
* [svn-r13580] Description:Quincey Koziol2007-04-031-2/+2
| | | | | | | | | | | | Add version # and flags to external link format (as fields in a single byte), in order to accomodate future changes/expansions. Tested on: Mac OS X/32 10.4.9 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty)
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r12736] Description:Quincey Koziol2006-10-091-6/+8
| | | | | | | | | | | | | | | | | | | Add "use the latest format" support for dataspace object header encode/ decode routines and clean up format a bit for the latest format (new to 1.8.x releases) Remove storing 'perm' parameter for array datatypes in memory and the file, and add test to make certain that if any user applications are attempting to store them, we get some reports back. (Should be unlikely, since the RefMan says that the parameter is not implemented and is unsupported). Carry those changes into the tests, etc. Clean up a bunch more compiler warnings. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-1.6-compat
* [svn-r12440] Purpose:Quincey Koziol2006-06-271-24/+24
| | | | | | | | | | | Code cleanup Description: Trim trailing whitespace in Makefile.am and C/C++ source files to make diffing changes easier. Platforms tested: None necessary, whitespace only change
* [svn-r12435] Purpose: Bug fixRaymond Lu2006-06-231-3/+15
| | | | | | | | | | | | 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.
* [svn-r12425] Purpose: Bug fixRaymond Lu2006-06-201-3/+19
| | | | | | | | | | | | | | | Description: Data conversion from long double to (unsigned) long long returns some incorrect values on Mac OS 10.4 and SGI IRIX64 6.5. The conversions start to go wrong when the long double is 20041683600089727.779961 (0x4351ccf385ebc8a0bfcc2a...). If adjusting the values higher by assigning 0x...c8a0cf... or 0x...c8a0df..., the converted values go wild. Solution: Detect this error in configure.in and disable compiler conversions from long double to (unsigned) long long for Mac OS 10.4 and IRIX64 6.5. Platforms tested: h5committest, Mac OS 10.4, and IRIX64 6.5.