summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-10 19:15:08 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-10 19:15:08 (GMT)
commitf2d14c76b8a8e7c09285fff9db25b101a84354b0 (patch)
tree3140de51fe2de7881be06500a426f51e8b288dea /fortran
parent202ea3747ebc1bca71c455ca083492960f032ec5 (diff)
downloadhdf5-f2d14c76b8a8e7c09285fff9db25b101a84354b0.zip
hdf5-f2d14c76b8a8e7c09285fff9db25b101a84354b0.tar.gz
hdf5-f2d14c76b8a8e7c09285fff9db25b101a84354b0.tar.bz2
[svn-r27186] added fix for jam with promoted reals and integers
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in1
-rw-r--r--fortran/examples/Makefile.in1
-rw-r--r--fortran/src/H5_f.c8
-rw-r--r--fortran/src/H5match_types.c10
-rw-r--r--fortran/src/Makefile.in1
-rw-r--r--fortran/test/Makefile.in1
-rw-r--r--fortran/test/tH5T.f901
-rw-r--r--fortran/testpar/Makefile.in1
8 files changed, 22 insertions, 2 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index c8a309d..54465a8 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -460,6 +460,7 @@ FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 15e98ac..0f6cb1a 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -404,6 +404,7 @@ FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index cca36fb..f21528f 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -22,7 +22,7 @@
*/
#include "H5f90.h"
-
+#include "H5fort_type_defines.h"
/****if* H5_f/h5init_types_c
* NAME
* h5init_types_c
@@ -92,6 +92,12 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
if ((types[2] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
}/*end else */
#endif
+#ifdef H5_HAVE_FLOAT128
+ else if(sizeof(double_f)==sizeof(__float128)) {
+ if ((types[2] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ( H5Tset_precision (types[2], 128) < 0) return ret_value;
+ }/*end else */
+#endif
/*
if ((types[3] = H5Tcopy(H5T_NATIVE_UINT8)) < 0) return ret_value;
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index cac50ab..b0e682d 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -488,6 +488,16 @@ int main(void)
writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE");
else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float))
writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT");
+#ifdef H5_HAVE_FLOAT128
+ /* Don't select a higher precision than Fortran can support */
+ else if(sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128");
+ }
+#else
+ else if(sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT128");
+ }
+#endif
else {
/* /\* No exact match, choose the next highest *\/ */
/* if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF > sizeof(long double)) */
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 5c9de7c..eac35d6 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -505,6 +505,7 @@ FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index bef4842..30f7c55 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -516,6 +516,7 @@ FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index 9aaaa73..efbceea 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -157,7 +157,6 @@ CONTAINS
CALL h5tclose_f(fixed_str2,error)
CALL check("h5tclose_f", error, total_error)
-
data_dims(1) = dimsize
!
! Initialize data buffer.
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index e40dda7..31184b3 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -456,6 +456,7 @@ FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@