summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-07-18 22:17:58 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-07-18 22:17:58 (GMT)
commit442f9854645775a2bc7b20efe2170fb5a15ea29b (patch)
treebe5df249ef8c9d178797bc1be422f251192de8cf /fortran/test
parentb79ca69a25aa612a97bc0aaa13710a2bf27a6376 (diff)
downloadhdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.zip
hdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.tar.gz
hdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.tar.bz2
[svn-r25433] Brought changes from the trunk into the branch.
For the top level, brings in changes for configure.ac, configure and the MANIFEST: svn merge -c25286 https://svn.hdfgroup.uiuc.edu/hdf5/trunk . svn merge -c25287 https://svn.hdfgroup.uiuc.edu/hdf5/trunk . svn merge -c25290 https://svn.hdfgroup.uiuc.edu/hdf5/trunk . For the fortran level: 384 17:00 svn merge -r25235:25272 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran 389 17:01 svn merge -r25284:25432 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran For the fortran merges, I skipped changes relating to hyperslab selection since the C source has not been merged from the trunk yet. These changes should be in place in the fortran source when the C source is merged to the 1.8 branch.
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt13
-rw-r--r--fortran/test/Makefile.am18
-rw-r--r--fortran/test/Makefile.in46
-rw-r--r--fortran/test/tH5MISC_1_8.f902
-rw-r--r--fortran/test/tH5P_F03.f9034
-rw-r--r--fortran/test/tH5T_F03.f9013
-rw-r--r--fortran/test/tf.f904
-rw-r--r--fortran/test/tf_F03.f90128
-rw-r--r--fortran/test/tf_F08.f90128
-rw-r--r--fortran/test/tf_F90.f9033
10 files changed, 384 insertions, 35 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 28b2ae1..d10f2ef 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -21,7 +21,18 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
+# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then
+# fall back to F2003. If F2003 not supported then use F90 for the tests.
+
+if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+ add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90)
+elseif (HDF5_ENABLE_F2003)
+ add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F03.f90 tf.f90)
+else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+ add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F90.f90 tf.f90)
+endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+
+
set (SHARED_LINK_FLAGS " ")
if (WIN32)
if (BUILD_SHARED_LIBS)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index c0b5395..735ab7a 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -53,7 +53,23 @@ endif
check_PROGRAMS=$(TEST_PROG)
-libh5test_fortran_la_SOURCES= tf.f90 t.c
+if FORTRAN_HAVE_STORAGE_SIZE
+if FORTRAN_HAVE_C_SIZEOF
+ libh5test_fortran_la_SOURCES = tf_F08.f90
+else
+ libh5test_fortran_la_SOURCES = tf_F03.f90
+endif
+else
+if FORTRAN_2003_CONDITIONAL_F
+ libh5test_fortran_la_SOURCES = tf_F03.f90
+else
+ libh5test_fortran_la_SOURCES = tf_F90.f90
+endif
+endif
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+libh5test_fortran_la_SOURCES += tf.f90 t.c
# Source files are used for both the library and fortranlib_test.
# Automake will complain about this without the following workaround.
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 1cf96a1..ca91cf5 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -101,7 +101,20 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libh5test_fortran_la_LIBADD =
-am_libh5test_fortran_la_OBJECTS = tf.lo t.lo
+am__libh5test_fortran_la_SOURCES_DIST = tf_F90.f90 tf.f90 t.c \
+ tf_F03.f90 tf_F08.f90
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F90.lo \
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo
libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -213,9 +226,9 @@ am__v_FCLD_1 =
SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \
$(fflush2_SOURCES) $(fortranlib_test_SOURCES) \
$(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES)
-DIST_SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \
- $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \
- $(fortranlib_test_1_8_SOURCES) \
+DIST_SOURCES = $(am__libh5test_fortran_la_SOURCES_DIST) \
+ $(fflush1_SOURCES) $(fflush2_SOURCES) \
+ $(fortranlib_test_SOURCES) $(fortranlib_test_1_8_SOURCES) \
$(am__fortranlib_test_F03_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -738,7 +751,30 @@ noinst_LTLIBRARIES = libh5test_fortran.la
# Our main targets, the tests themselves
TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \
$(am__append_2)
-libh5test_fortran_la_SOURCES = tf.f90 t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F90.f90 \
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \
+@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F03.f90 \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \
+@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F08.f90 \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c
# Source files are used for both the library and fortranlib_test.
# Automake will complain about this without the following workaround.
diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.f90
index bb7d50a..efc350e 100644
--- a/fortran/test/tH5MISC_1_8.f90
+++ b/fortran/test/tH5MISC_1_8.f90
@@ -257,7 +257,7 @@ SUBROUTINE test_h5s_encode(cleanup, total_error)
! /* Verify the decoded dataspace */
CALL h5sget_simple_extent_npoints_f(decoded_sid1, n, error)
CALL check("h5sget_simple_extent_npoints_f", error, total_error)
- CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, &
+ CALL VERIFY("h5sget_simple_extent_npoints_f", INT(n), INT(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3), &
total_error)
!
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index 6039a52..91d9e3a 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -106,20 +106,12 @@ SUBROUTINE test_create(total_error)
INTEGER(hsize_t), DIMENSION(1:5), PARAMETER :: ch_size= (/1, 1, 1, 4, 1/)
CHARACTER(LEN=14) :: filename ='test_create.h5'
- ! /* compound datatype operations */
- TYPE, BIND(C) :: comp_datatype
- REAL :: a
- INTEGER :: x
- DOUBLE PRECISION :: y
- CHARACTER(LEN=1) :: z
- END TYPE comp_datatype
-
TYPE(comp_datatype), TARGET :: rd_c, fill_ctype
INTEGER :: error
INTEGER(SIZE_T) :: h5off
TYPE(C_PTR) :: f_ptr
LOGICAL :: differ1, differ2
-
+
!/*
! * Create a file.
! */
@@ -136,8 +128,7 @@ SUBROUTINE test_create(total_error)
CALL check("h5pset_chunk_f",error, total_error)
! /* Create a compound datatype */
-
- CALL h5tcreate_f(H5T_COMPOUND_F, INT(SIZEOF(fill_ctype),size_t), comp_type_id, error)
+ CALL h5tcreate_f(H5T_COMPOUND_F, H5_SIZEOF(fill_ctype), comp_type_id, error)
CALL check("h5tcreate_f", error, total_error)
h5off = H5OFFSETOF(C_LOC(fill_ctype), C_LOC(fill_ctype%a))
CALL h5tinsert_f(comp_type_id, "a", h5off , H5T_NATIVE_REAL, error)
@@ -394,6 +385,8 @@ SUBROUTINE test_h5p_file_image(total_error)
TYPE(C_PTR), DIMENSION(1:count) :: f_ptr1
TYPE(C_PTR), DIMENSION(1:1) :: f_ptr2
+ INTEGER(HSIZE_T) :: sizeof_buffer
+
! Initialize file image buffer
DO i = 1, count
buffer(i) = i*10
@@ -412,7 +405,8 @@ SUBROUTINE test_h5p_file_image(total_error)
! Set file image
f_ptr = C_LOC(buffer(1))
- size = SIZEOF(buffer)
+ size = H5_SIZEOF(buffer(1))*count
+
CALL h5pset_file_image_f(fapl_1, f_ptr, size, error)
CALL check("h5pset_file_image_f", error, total_error)
@@ -465,8 +459,8 @@ SUBROUTINE external_test_offset(cleanup,total_error)
INTEGER(hid_t) :: dset=-1 ! dataset
INTEGER(hid_t) :: grp=-1 ! group to emit diagnostics
INTEGER(size_t) :: i, j ! miscellaneous counters
- CHARACTER(LEN=180) :: filename ! file names
- INTEGER, DIMENSION(1:25) :: part ! raw data buffers
+ CHARACTER(LEN=180) :: filename ! file names
+ INTEGER, DIMENSION(1:25) :: part
INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers
INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size
INTEGER(hid_t) :: hs_space ! hyperslab data space
@@ -475,6 +469,7 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CHARACTER(LEN=1) :: ichr1 ! character conversion holder
INTEGER :: error ! error status
TYPE(C_PTR) :: f_ptr ! fortran pointer
+ INTEGER(HSIZE_T) :: sizeof_part
CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:30) :: temparray
@@ -503,15 +498,18 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL check("h5gcreate_f",error, total_error)
! Create the dataset
+
+ sizeof_part = INT(H5_SIZEOF(part(1))*25, hsize_t)
+
CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), sizeof_part, error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), sizeof_part, error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), sizeof_part, error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), sizeof_part, error)
CALL check("h5pset_external_f",error,total_error)
cur_size(1) = 100
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index fc3ebd0..f15424d 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -661,9 +661,6 @@ END SUBROUTINE test_array_compound_atomic
USE ISO_C_BINDING
IMPLICIT NONE
- INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(5)
- INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(10)
-
INTEGER, INTENT(INOUT) :: total_error
INTEGER, PARAMETER :: LENGTH = 5
@@ -685,8 +682,8 @@ END SUBROUTINE test_array_compound_atomic
TYPE CmpField_struct
INTEGER, DIMENSION(1:ALEN) :: a
- REAL(KIND=r_k4), DIMENSION(1:ALEN) :: b
- REAL(KIND=r_k8), DIMENSION(1:ALEN) :: c
+ REAL(KIND=sp), DIMENSION(1:ALEN) :: b
+ REAL(KIND=dp), DIMENSION(1:ALEN) :: c
ENDTYPE CmpField_struct
TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf
@@ -702,7 +699,7 @@ END SUBROUTINE test_array_compound_atomic
TYPE(CmpDTSinfo_struct) :: dtsinfo
TYPE fld_t_struct
- REAL(KIND=r_k4), DIMENSION(1:ALEN) :: b
+ REAL(KIND=sp), DIMENSION(1:ALEN) :: b
END TYPE fld_t_struct
INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype
@@ -741,10 +738,10 @@ END SUBROUTINE test_array_compound_atomic
! -----------------------
CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error)
CALL check("h5tget_size_f", error, total_error)
- IF(sizeof(cf(1)%b(1)).EQ.4)THEN
+ IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN
CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
- ELSE IF(sizeof(cf(1)%b(1)).EQ.8)THEN
+ ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN
CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
ENDIF
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 2964840..063e93d 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -29,7 +29,9 @@
!*****
MODULE TH5_MISC
- INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15, 307)
+ USE TH5_MISC_PROVISIONAL
+
+ IMPLICIT NONE
CONTAINS
diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90
new file mode 100644
index 0000000..4513783
--- /dev/null
+++ b/fortran/test/tf_F03.f90
@@ -0,0 +1,128 @@
+!****h* root/fortran/test/tf_F03.f90
+!
+! NAME
+! tf_F03.f90
+!
+! FUNCTION
+! Contains functions that are part of the F2003 standard, and are not F2008 compliant.
+! Needed by the hdf5 fortran tests.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! CONTAINS SUBROUTINES
+! H5_SIZEOF
+!
+! NOTES
+! The Sun/Oracle compiler has the following restrictions on the SIZEOF intrinsic function:
+!
+! "The SIZEOF intrinsic cannot be applied to arrays of an assumed size, characters of a
+! length that is passed, or subroutine calls or names. SIZEOF returns default INTEGER*4 data.
+! If compiling for a 64-bit environment, the compiler will issue a warning if the result overflows
+! the INTEGER*4 data range. To use SIZEOF in a 64-bit environment with arrays larger
+! than the INTEGER*4 limit (2 Gbytes), the SIZEOF function and
+! the variables receiving the result must be declared INTEGER*8."
+!
+! Thus, we can not overload the H5_SIZEOF function to handle arrays (as used in tH5P_F03.f90), or
+! characters that do not have a set length (as used in tH5P_F03.f90), sigh...
+!
+!*****
+MODULE TH5_MISC_PROVISIONAL
+
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors
+ INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors
+
+ ! generic compound datatype
+ TYPE, BIND(C) :: comp_datatype
+ REAL :: a
+ INTEGER :: x
+ DOUBLE PRECISION :: y
+ CHARACTER(LEN=1) :: z
+ END TYPE comp_datatype
+
+ PUBLIC :: H5_SIZEOF
+ INTERFACE H5_SIZEOF
+ MODULE PROCEDURE H5_SIZEOF_CMPD
+ MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_CHR
+ MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP
+ END INTERFACE
+
+CONTAINS
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_cmpd
+ !DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
+ IMPLICIT NONE
+ TYPE(comp_datatype), INTENT(in) :: a
+
+ H5_SIZEOF_CMPD = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CMPD
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_chr
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
+ IMPLICIT NONE
+ CHARACTER(LEN=1), INTENT(in):: a
+
+ H5_SIZEOF_CHR = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CHR
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_i
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
+ IMPLICIT NONE
+ INTEGER, INTENT(in):: a
+
+ H5_SIZEOF_I = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_I
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_sp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
+ IMPLICIT NONE
+ REAL(sp), INTENT(in):: a
+
+ H5_SIZEOF_SP = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_SP
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_dp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)
+ IMPLICIT NONE
+ REAL(dp), INTENT(in):: a
+
+ H5_SIZEOF_DP = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_DP
+
+END MODULE TH5_MISC_PROVISIONAL
diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90
new file mode 100644
index 0000000..5583f3f
--- /dev/null
+++ b/fortran/test/tf_F08.f90
@@ -0,0 +1,128 @@
+!****h* root/fortran/test/tf_F08.f90
+!
+! NAME
+! tf_F08.f90
+!
+! FUNCTION
+! Contains functions that are part of the F2008 standard and needed by
+! the hdf5 fortran tests.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! CONTAINS SUBROUTINES
+! H5_SIZEOF
+!
+! NOTES
+! This file contains "sizeof" functions that are F2008 standard compliant
+! and replace the non-standard 'SIZEOF' functions found in the file tf_F03.
+! Unfortunity we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different
+! data types from the various tests.
+!
+! F08+TS29113 requires C interoperable variable as argument for C_SIZEOF.
+!
+! This file will be build instead of tf_F03.f90 if the intrinsic fortran
+! function C_SIZEOF/STORAGE_SIZE is found during configure.
+!
+!*****
+MODULE TH5_MISC_PROVISIONAL
+
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(5) ! This should map to REAL*4 on most modern processors
+ INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors
+
+ ! generic compound datatype
+ TYPE, BIND(C) :: comp_datatype
+ REAL :: a
+ INTEGER :: x
+ DOUBLE PRECISION :: y
+ CHARACTER(LEN=1) :: z
+ END TYPE comp_datatype
+
+ PUBLIC :: H5_SIZEOF
+ INTERFACE H5_SIZEOF
+ MODULE PROCEDURE H5_SIZEOF_CMPD
+ MODULE PROCEDURE H5_SIZEOF_CHR
+ MODULE PROCEDURE H5_SIZEOF_I
+ MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP
+ END INTERFACE
+
+CONTAINS
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_cmpd
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
+ IMPLICIT NONE
+ TYPE(comp_datatype), INTENT(in) :: a
+
+ H5_SIZEOF_CMPD = C_SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CMPD
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_chr
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(in) :: a
+
+ H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_CHR
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_i
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
+ IMPLICIT NONE
+ INTEGER, INTENT(in):: a
+
+ H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_I
+
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_sp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
+ IMPLICIT NONE
+ REAL(sp), INTENT(in):: a
+
+ H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_SP
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_dp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)
+ IMPLICIT NONE
+ REAL(dp), INTENT(in):: a
+
+ H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_DP
+
+END MODULE TH5_MISC_PROVISIONAL
diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90
new file mode 100644
index 0000000..11a047c
--- /dev/null
+++ b/fortran/test/tf_F90.f90
@@ -0,0 +1,33 @@
+!****h* root/fortran/test/tf_F90.f90
+!
+! NAME
+! tf_F90.f90
+!
+! FUNCTION
+! Module for when the compiler is not F2003 or F2008 compliant.
+! Needed by tf.f90 for the test programs.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!*****
+MODULE TH5_MISC_PROVISIONAL
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: sp = KIND(0.0)
+ INTEGER, PARAMETER :: dp = KIND(0.D0)
+
+END MODULE TH5_MISC_PROVISIONAL