diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-02-18 16:42:47 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-02-18 16:42:47 (GMT) |
commit | a75fd4c9600e3b36ceb67832d50e32ba277c5728 (patch) | |
tree | b208d26fd7543372fb08e7e7135018f8d882b926 /fortran/test | |
parent | 546899dcd63b60bda5f52602ea6f799765d2f096 (diff) | |
download | hdf5-a75fd4c9600e3b36ceb67832d50e32ba277c5728.zip hdf5-a75fd4c9600e3b36ceb67832d50e32ba277c5728.tar.gz hdf5-a75fd4c9600e3b36ceb67832d50e32ba277c5728.tar.bz2 |
[svn-r26205] Fix for HDFFV-8908:
h5tenum_insert_f does not work with default 8 byte integers (xlf compiler)
Diffstat (limited to 'fortran/test')
-rw-r--r-- | fortran/test/tH5T_F03.f90 | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90 index f15424d..cf27284 100644 --- a/fortran/test/tH5T_F03.f90 +++ b/fortran/test/tH5T_F03.f90 @@ -1379,7 +1379,8 @@ SUBROUTINE t_enum(total_error) INTEGER(hsize_t), DIMENSION(1:2) :: dims = (/dim0, dim1/) INTEGER, DIMENSION(1:dim0, 1:dim1), TARGET :: wdata ! Write buffer INTEGER, DIMENSION(:,:), ALLOCATABLE, TARGET :: rdata ! Read buffer - INTEGER, DIMENSION(1:1), TARGET :: val + INTEGER(C_INT), DIMENSION(1:1), TARGET :: val + INTEGER(C_INT), TARGET :: c_val CHARACTER(LEN=6), DIMENSION(1:4) :: & names = (/"SOLID ", "LIQUID", "GAS ", "PLASMA"/) @@ -1398,6 +1399,12 @@ SUBROUTINE t_enum(total_error) wdata(i,j) = MOD( (j-1)*(i-1), PLASMA+1) ENDDO ENDDO + PRINT*,F_BASET,M_BASET + val(1) = 0 +!!$ f_ptr = C_LOC(val(1)) +!!$ CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) +!!$ stop + ! ! Create a new file using the default properties. ! @@ -1419,18 +1426,28 @@ SUBROUTINE t_enum(total_error) ! Insert enumerated value for memtype. ! val(1) = i - CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), val(1), error) + ! c_val = val(1) + f_ptr = C_LOC(val(1)) + CALL H5Tenum_insert_f(memtype, TRIM(names(i+1)), f_ptr, error) CALL check("H5Tenum_insert_f", error, total_error) ! ! Insert enumerated value for filetype. We must first convert ! the numerical value val to the base type of the destination. ! - f_ptr = C_LOC(val(1)) + ! f_ptr = C_LOC(val(1)) + ! c_val = val(1) + ! f_ptr = C_LOC(c_val) + PRINT*,'a0',val(1), sizeof(val(1)) CALL H5Tconvert_f(M_BASET, F_BASET, INT(1,SIZE_T), f_ptr, error) + ! val(1) = c_val + PRINT*,'aa',val(1) + ! if(i.eq.1)stop CALL check("H5Tconvert_f",error, total_error) - CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), val(1), error) + CALL H5Tenum_insert_f(filetype, TRIM(names(i+1)), f_ptr, error) CALL check("H5Tenum_insert_f",error, total_error) + if(i.eq.1) STOP ENDDO + stop ! ! Create dataspace. Setting maximum size to be the current size. ! |