summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-05-18 21:07:24 (GMT)
committerGitHub <noreply@github.com>2023-05-18 21:07:24 (GMT)
commit482920808f1ec5f33770af1360bdf56ebec5eb8c (patch)
tree619b53f1106ce54fc0f7301fb8ac6d0a3749c185 /fortran
parentdc3ef6055f7f0e251683637326bc8ea6a2062e34 (diff)
downloadhdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.zip
hdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.tar.gz
hdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.tar.bz2
Fixes failures with gfortran 4.8 (#2979)
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Off.F9028
-rw-r--r--fortran/test/tH5P_F03.F9012
-rw-r--r--fortran/test/tf.F904
3 files changed, 25 insertions, 19 deletions
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 7810b6e..84a1590 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -1027,7 +1027,7 @@ CONTAINS
INTEGER, INTENT(IN) :: order
TYPE(C_FUNPTR), INTENT(IN) :: op
- TYPE(C_PTR), INTENT(IN) :: op_data
+ TYPE(C_PTR), INTENT(IN) :: op_data
INTEGER, INTENT(OUT) :: return_value
INTEGER, INTENT(OUT) :: hdferr
INTEGER, INTENT(IN), OPTIONAL :: fields
@@ -1039,12 +1039,12 @@ CONTAINS
IMPORT :: C_FUNPTR, C_PTR
IMPORT :: HID_T
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: object_id
- INTEGER, INTENT(IN) :: index_type
- INTEGER, INTENT(IN) :: order
+ INTEGER(HID_T):: object_id
+ INTEGER :: index_type
+ INTEGER :: order
TYPE(C_FUNPTR), VALUE :: op
TYPE(C_PTR), VALUE :: op_data
- INTEGER, INTENT(IN) :: fields
+ INTEGER :: fields
END FUNCTION h5ovisit_c
END INTERFACE
@@ -1343,15 +1343,15 @@ CONTAINS
IMPORT :: C_CHAR, C_PTR, C_FUNPTR
IMPORT :: HID_T, SIZE_T
IMPLICIT NONE
- INTEGER(HID_T) , INTENT(IN) :: loc_id
- CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name
- INTEGER(SIZE_T) :: namelen
- INTEGER , INTENT(IN) :: index_type
- INTEGER , INTENT(IN) :: order
- TYPE(C_FUNPTR) , VALUE :: op
- TYPE(C_PTR) , VALUE :: op_data
- INTEGER(HID_T) , INTENT(IN) :: lapl_id
- INTEGER , INTENT(IN) :: fields
+ INTEGER(HID_T) :: loc_id
+ CHARACTER(KIND=C_CHAR), DIMENSION(*) :: object_name
+ INTEGER(SIZE_T) :: namelen
+ INTEGER :: index_type
+ INTEGER :: order
+ TYPE(C_FUNPTR), VALUE :: op
+ TYPE(C_PTR) , VALUE :: op_data
+ INTEGER(HID_T) :: lapl_id
+ INTEGER :: fields
END FUNCTION h5ovisit_by_name_c
END INTERFACE
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index 0875b81..f15a471 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -532,6 +532,7 @@ 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
+ INTEGER :: k
CHARACTER(LEN=180) :: filename ! file names
INTEGER, DIMENSION(1:25) :: part
INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers
@@ -598,8 +599,9 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL h5dread_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space_id=space, file_space_id=space)
CALL check("h5dread_f", error, total_error)
- DO i = 1, 100
- IF(whole(i) .NE. i-1)THEN
+ DO k = 1, 100
+ CALL verify("h5dread_f", whole(k), k-1, error)
+ IF(error .NE. 0)THEN
WRITE(*,*) "Incorrect value(s) read."
total_error = total_error + 1
EXIT
@@ -619,8 +621,10 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL h5sclose_f(hs_space, error)
CALL check("h5sclose_f", error, total_error)
- DO i = INT(hs_start(1))+1, INT(hs_start(1)+hs_count(1))
- IF(whole(i) .NE. i-1)THEN
+
+ DO k = INT(hs_start(1))+1, INT(hs_start(1)+hs_count(1))
+ CALL verify("h5dread_f", whole(k), k-1, error)
+ IF(error .NE. 0)THEN
WRITE(*,*) "Incorrect value(s) read."
total_error = total_error + 1
EXIT
diff --git a/fortran/test/tf.F90 b/fortran/test/tf.F90
index 73f43bc..61451af 100644
--- a/fortran/test/tf.F90
+++ b/fortran/test/tf.F90
@@ -69,9 +69,11 @@ CONTAINS
CHARACTER(LEN=*), INTENT(IN) :: title_header ! test name
INTEGER, PARAMETER :: width = TAB_SPACE+10
- CHARACTER(LEN=2*width) ::title_centered =" "
+ CHARACTER(LEN=2*width) ::title_centered
INTEGER :: len, i
+ title_centered(:) = " "
+
len=LEN_TRIM(title_header)
title_centered(1:3) ="| |"
title_centered((width-len)/2:(width-len)/2+len) = TRIM(title_header)