summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-19 16:17:16 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-02-19 16:17:16 (GMT)
commit3eeed2f1d558bd74c2360b31366e2650026d165f (patch)
treebc7bff3483c7cca9abe666a5170107e2b7e9a3ab /fortran/test
parentfc082e60f3a258cba67ab1a16e11748a31de10eb (diff)
downloadhdf5-3eeed2f1d558bd74c2360b31366e2650026d165f.zip
hdf5-3eeed2f1d558bd74c2360b31366e2650026d165f.tar.gz
hdf5-3eeed2f1d558bd74c2360b31366e2650026d165f.tar.bz2
[svn-r26241] Fixed issue with default 8 byte integers using xlf compilers.
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/tH5T_F03.f9018
1 files changed, 11 insertions, 7 deletions
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index d9a671c..e019d0f 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -1428,7 +1428,11 @@ SUBROUTINE t_enum(total_error)
f_ptr = C_LOC(val(1))
CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error)
CALL check("H5Tconvert_f",error, total_error)
- CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error)
+ IF(i.GE.1)THEN ! test both F90 and F03 APIs
+ CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error)
+ ELSE
+ CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error)
+ ENDIF
CALL check("H5Tenum_insert_f",error, total_error)
ENDDO
!
@@ -3134,7 +3138,7 @@ SUBROUTINE t_enum_conv(total_error)
ENUMERATOR :: E1_RED, E1_GREEN, E1_BLUE, E1_WHITE, E1_BLACK
END ENUM
- INTEGER :: val
+ INTEGER(KIND(E1_RED)), TARGET :: val
! Enumerated data array
! Some values are out of range for testing. The library should accept them
@@ -3185,19 +3189,19 @@ SUBROUTINE t_enum_conv(total_error)
! Initialize enum data.
!
val = E1_RED
- CALL H5Tenum_insert_f(dtype, "RED", val, error)
+ CALL H5Tenum_insert_f(dtype, "RED", C_LOC(val), error)
CALL check("h5tenum_insert_f",error, total_error)
val = E1_GREEN
- CALL H5Tenum_insert_f(dtype, "GREEN", val, error)
+ CALL H5Tenum_insert_f(dtype, "GREEN", C_LOC(val), error)
CALL check("h5tenum_insert_f",error, total_error)
val = E1_BLUE
- CALL H5Tenum_insert_f(dtype, "BLUE", val, error)
+ CALL H5Tenum_insert_f(dtype, "BLUE", C_LOC(val), error)
CALL check("h5tenum_insert_f",error, total_error)
val = E1_WHITE
- CALL H5Tenum_insert_f(dtype, "WHITE", val, error)
+ CALL H5Tenum_insert_f(dtype, "WHITE", C_LOC(val), error)
CALL check("h5tenum_insert_f",error, total_error)
val = E1_BLACK
- CALL H5Tenum_insert_f(dtype, "BLACK", val, error)
+ CALL H5Tenum_insert_f(dtype, "BLACK", C_LOC(val), error)
CALL check("h5tenum_insert_f",error, total_error)
!
! Create dataspace. Setting maximum size to be the current size.