summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5_ff.F90
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2016-10-06 20:34:39 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2016-10-06 20:34:39 (GMT)
commitc604bca0445ba1d05a976a673768fa677422e93e (patch)
tree7d5438638d4081cb0fcbd1620f6ca0eaf543f1fe /fortran/src/H5_ff.F90
parent783f01f478f99711710b24d8c85b0555dcdcf1fc (diff)
parentf9364c0080405bb36d704eb3f9505029d3da41f4 (diff)
downloadhdf5-c604bca0445ba1d05a976a673768fa677422e93e.zip
hdf5-c604bca0445ba1d05a976a673768fa677422e93e.tar.gz
hdf5-c604bca0445ba1d05a976a673768fa677422e93e.tar.bz2
Merge pull request #47 in HDFFV/hdf5 from ~BRTNFLD/hdf5_msb:develop to develop
* commit 'f9364c0080405bb36d704eb3f9505029d3da41f4': removed the use of C_SIZEOF for non BIND(C) derived type Fixed test to use storage_size instead of c_sizeof when available. fixed missing closing bracket Removed unused variables. Fixed: Fortran_DOUBLE was being set to C_LONG_DOUBLE when C_LONG_DOUBLE is not available. Removed duplicate FCFLAG Removed duplicate FCFLAG. Added number of integer KINDs found to the header files. Added path to source include files when building buidiface. Added rule to build buildiface program, without a rule, build would add repeated compile options when using the NAG compiler. Misc. cleaning up of the program. Added SEQUENCE to derived types for NAG: misc. format code-cleanup Removed the use of hard-coded integer KINDs. Code clean-up. HDFFV-9973 Fortran library fails to compile and fails tests with NAG compiler
Diffstat (limited to 'fortran/src/H5_ff.F90')
-rw-r--r--fortran/src/H5_ff.F9039
1 files changed, 16 insertions, 23 deletions
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 169864f..228e148 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -379,27 +379,23 @@ CONTAINS
IMPLICIT NONE
INTEGER, INTENT(IN) :: ikind
INTEGER, INTENT(IN) :: flag
-#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0
- INTEGER :: Fortran_INTEGER_16
- Fortran_INTEGER_16=SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors
-#endif
-
-
+ INTEGER :: i
!*****
+
+!#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0
+! ! (1) The array index assumes INTEGER*16 the last integer in the series, and
+! ! (2) it should map to INTEGER*16 on most modern processors
+! H5T_NATIVE_INTEGER_KIND(H5_FORTRAN_NUM_INTEGER_KINDS)=SELECTED_INT_KIND(36)
+!#endif
+
+ h5_type = -1
IF(flag.EQ.H5_INTEGER_KIND)THEN
- IF(ikind.EQ.Fortran_INTEGER_1)THEN
- h5_type = H5T_NATIVE_INTEGER_1
- ELSE IF(ikind.EQ.Fortran_INTEGER_2)THEN
- h5_type = H5T_NATIVE_INTEGER_2
- ELSE IF(ikind.EQ.Fortran_INTEGER_4)THEN
- h5_type = H5T_NATIVE_INTEGER_4
- ELSE IF(ikind.EQ.Fortran_INTEGER_8)THEN
- h5_type = H5T_NATIVE_INTEGER_8
-#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0
- ELSE IF(ikind.EQ.Fortran_INTEGER_16)THEN
- h5_type = H5T_NATIVE_INTEGER_16
-#endif
- ENDIF
+ do_kind: DO i = 1, H5_FORTRAN_NUM_INTEGER_KINDS
+ IF(ikind.EQ.Fortran_INTEGER_AVAIL_KINDS(i))THEN
+ h5_type = H5T_NATIVE_INTEGER_KIND(i)
+ EXIT do_kind
+ ENDIF
+ END DO do_kind
ELSE IF(flag.EQ.H5_REAL_KIND)THEN
IF(ikind.EQ.KIND(1.0_C_FLOAT))THEN
h5_type = H5T_NATIVE_REAL_C_FLOAT
@@ -409,14 +405,11 @@ CONTAINS
ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN
h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE
#endif
-#if H5_PAC_FC_MAX_REAL_PRECISION > 28
+#if H5_PAC_FC_MAX_REAL_PRECISION > 28
#if H5_HAVE_FLOAT128 == 1
ELSE
h5_type = H5T_NATIVE_FLOAT_128
#endif
-#else
- ELSE
- h5_type = -1
#endif
ENDIF
ENDIF