summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2016-09-22 16:23:45 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2016-09-22 16:23:45 (GMT)
commita0c74196f0d0ba3c81c91024438b7a91d757fe4e (patch)
treeb9e3a8416c76c72a0ea62fe3cce5cc49f5fd449d /fortran
parentb2cb046d514861c54bd33a1ac85aa67ded3e240d (diff)
downloadhdf5-a0c74196f0d0ba3c81c91024438b7a91d757fe4e.zip
hdf5-a0c74196f0d0ba3c81c91024438b7a91d757fe4e.tar.gz
hdf5-a0c74196f0d0ba3c81c91024438b7a91d757fe4e.tar.bz2
Fix for:
HDFFV-9973 Fortran library fails to compile and fails tests with NAG compiler HDFFV-9980 Fix segfaults for F03 tests in 1.8 branch
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Pff_F03.f904
-rw-r--r--fortran/test/tH5T_F03.f9020
2 files changed, 7 insertions, 17 deletions
diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90
index 01d1d98..e35073d 100644
--- a/fortran/src/H5Pff_F03.f90
+++ b/fortran/src/H5Pff_F03.f90
@@ -471,7 +471,7 @@ CONTAINS
!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr)
!! INTEGER(HID_T), INTENT(IN) :: prp_id
!! INTEGER(HID_T), INTENT(IN) :: type_id
-!! TYPE(C_PTR) , INTENT(OUT) :: fillvalue
+!! TYPE(C_PTR) :: fillvalue
!! INTEGER , INTENT(OUT) :: hdferr
!*****
@@ -482,7 +482,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of
! of fillvalue datatype
! (in memory)
- TYPE(C_PTR), INTENT(OUT) :: fillvalue ! Fillvalue
+ TYPE(C_PTR) :: fillvalue ! Fillvalue
INTEGER, INTENT(OUT) :: hdferr ! Error code
hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue)
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index 32531b0..89451a6 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -2919,33 +2919,23 @@ SUBROUTINE setup_buffer(data_in, line_lengths, char_type)
CHARACTER(len=10), DIMENSION(:) :: data_in
INTEGER(size_t), DIMENSION(:) :: line_lengths
- INTEGER, DIMENSION(1:3) :: letters
- CHARACTER(LEN=3) :: lets
+ CHARACTER(LEN=3) :: lets = 'abc'
CHARACTER(KIND=C_CHAR,LEN=*) :: char_type
- CHARACTER(KIND=C_CHAR,LEN=1) :: char_tmp
- INTEGER :: i, j, n, ff
+ INTEGER :: i, j, n
- ! Convert the letters and special character to integers
- lets = 'abc'
-
- READ(lets,'(3A1)') letters
- READ(char_type,'(A1)') ff
n = SIZE(data_in)
j = 1
DO i=1,n-1
IF( j .EQ. 4 )THEN
- WRITE(char_tmp,'(A1)') ff
- data_in(i:i) = char_tmp
+ data_in(i:i) = char_type(1:1)
ELSE
- WRITE(char_tmp,'(A1)') letters(j)
- data_in(i:i) = char_tmp
+ data_in(i:i) = lets(j:j)
ENDIF
line_lengths(i) = LEN_TRIM(data_in(i))
j = j + 1
IF( j .EQ. 5 ) j = 1
END DO
- WRITE(char_tmp,'(A1)') ff
- data_in(n:n) = char_tmp
+ data_in(n:n) = char_type(1:1)
line_lengths(n) = 1
END SUBROUTINE setup_buffer