summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-08 21:13:15 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-08 21:13:15 (GMT)
commit32703c9fc5a315a005abf26965d5545043fd3605 (patch)
tree342146825782a26babcd939201f7d657520c84dc /fortran/test
parent8641814c4e5b4211e0980df783c3d2d25f484226 (diff)
downloadhdf5-32703c9fc5a315a005abf26965d5545043fd3605.zip
hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.gz
hdf5-32703c9fc5a315a005abf26965d5545043fd3605.tar.bz2
[svn-r27164] various bug fixes for DT
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/Makefile.in1
-rw-r--r--fortran/test/tH5T.f902
-rw-r--r--fortran/test/tH5T_F03.F9017
3 files changed, 19 insertions, 1 deletions
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 431c42a..6478b50 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -573,6 +573,7 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90
index 9aaaa73..d845f73 100644
--- a/fortran/test/tH5T.f90
+++ b/fortran/test/tH5T.f90
@@ -213,8 +213,10 @@ CONTAINS
CALL check("h5tget_size_f", error, total_error)
CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error)
CALL check("h5tget_size_f", error, total_error)
+ PRINT*,H5T_NATIVE_DOUBLE
CALL h5tget_size_f(H5T_NATIVE_DOUBLE, type_sized, error)
CALL check("h5tget_size_f", error, total_error)
+ stop
CALL h5tget_size_f(H5T_NATIVE_REAL, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
!write(*,*) "get sizes", type_sizec, type_sizei, type_sizer, type_sized
diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90
index ee9f2f2..995243f 100644
--- a/fortran/test/tH5T_F03.F90
+++ b/fortran/test/tH5T_F03.F90
@@ -994,10 +994,25 @@ END SUBROUTINE test_array_compound_atomic
INTEGER, PARAMETER :: real_kind_7 = C_FLOAT !should map to REAL*4 on most modern processors
INTEGER, PARAMETER :: real_kind_15 = C_DOUBLE !should map to REAL*8 on most modern processors
+! Check if C has quad precision extension
#if H5_HAVE_FLOAT128!=0
+! Check if Fortran supports quad precision
+# if H5_PAC_FC_MAX_REAL_PRECISION > 26
INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31)
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
#else
- INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(17)
+! Check if the default of long double is quad precision
+# if H5_PAC_C_MAX_REAL_PRECISION > 26
+# if H5_PAC_FC_MAX_REAL_PRECISION > 26
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31)
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
+# else
+ INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(15,307)
+# endif
#endif
REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31
INTEGER(HID_T) :: dset_idr16 ! Dataset identifier