summaryrefslogtreecommitdiffstats
path: root/fortran/test
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/test
parentdc3ef6055f7f0e251683637326bc8ea6a2062e34 (diff)
downloadhdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.zip
hdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.tar.gz
hdf5-482920808f1ec5f33770af1360bdf56ebec5eb8c.tar.bz2
Fixes failures with gfortran 4.8 (#2979)
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/tH5P_F03.F9012
-rw-r--r--fortran/test/tf.F904
2 files changed, 11 insertions, 5 deletions
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)