summaryrefslogtreecommitdiffstats
path: root/fortran/test/tf.F90
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test/tf.F90')
-rw-r--r--fortran/test/tf.F9013
1 files changed, 5 insertions, 8 deletions
diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90
index 219254b..26b3e99 100644
--- a/fortran/test/tf.F90
+++ b/fortran/test/tf.F90
@@ -40,7 +40,8 @@ MODULE TH5_MISC
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
+ TYPE :: comp_datatype
+ SEQUENCE
REAL :: a
INTEGER :: x
DOUBLE PRECISION :: y
@@ -336,14 +337,10 @@ CONTAINS
IMPLICIT NONE
TYPE(comp_datatype), INTENT(in) :: a
-#ifdef H5_FORTRAN_HAVE_C_SIZEOF
- H5_SIZEOF_CMPD = C_SIZEOF(a)
+#ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
+ H5_SIZEOF_CMPD = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
#else
-# ifdef H5_FORTRAN_HAVE_STORAGE_SIZE
- H5_SIZEOF_CMPD = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
-# else
- H5_SIZEOF_CMPD = SIZEOF(a)
-# endif
+ H5_SIZEOF_CMPD = SIZEOF(a)
#endif
END FUNCTION H5_SIZEOF_CMPD