summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-05 04:51:08 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-10-05 04:51:08 (GMT)
commit817bfb6499f266113fa8146b980e065a133b1374 (patch)
tree8d0b797e7f17ad3b6b6904d2846e5e97f301b585 /fortran
parent440044ebaf3bff7800a48fc538c8b1281d54f507 (diff)
downloadhdf5-817bfb6499f266113fa8146b980e065a133b1374.zip
hdf5-817bfb6499f266113fa8146b980e065a133b1374.tar.gz
hdf5-817bfb6499f266113fa8146b980e065a133b1374.tar.bz2
[svn-r21475] Description: fixed C_LOC(X) non-standard argument X for multi-dimensional arrays detected using xlf compiler.
Tested: jam (intel, gnu, pgi) F2003 compilers.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Aff_F03.f9056
-rw-r--r--fortran/src/H5Dff_F03.f9056
-rw-r--r--fortran/src/H5Pff_F03.f9010
-rw-r--r--fortran/test/tH5A_1_8.f902
4 files changed, 62 insertions, 62 deletions
diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90
index e43e457..387dbae 100644
--- a/fortran/src/H5Aff_F03.f90
+++ b/fortran/src/H5Aff_F03.f90
@@ -201,8 +201,8 @@ CONTAINS
DIMENSION(dims(1)), TARGET :: buf ! Attribute data
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
-
- f_ptr = C_LOC(buf)
+
+ f_ptr = C_LOC(buf(1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_integer_1
@@ -221,7 +221,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -238,7 +238,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -257,7 +257,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -276,7 +276,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -295,7 +295,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_integer_6
@@ -313,7 +313,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -348,7 +348,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -368,7 +368,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
@@ -388,7 +388,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_real_3
@@ -407,7 +407,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_real_4
@@ -445,7 +445,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_real_6
@@ -463,7 +463,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_real_7
@@ -692,7 +692,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_1
@@ -709,7 +709,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_2
@@ -727,7 +727,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_3
@@ -745,7 +745,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_4
@@ -763,7 +763,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_5
@@ -781,7 +781,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_6
@@ -799,7 +799,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_integer_7
@@ -833,7 +833,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_1
@@ -851,7 +851,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_2
@@ -870,7 +870,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_3
@@ -888,7 +888,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_4
@@ -906,7 +906,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_5
@@ -924,7 +924,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_6
@@ -942,7 +942,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: hdferr ! Error code
TYPE(C_PTR) :: f_ptr
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_real_7
diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90
index d99d31b..a703a14 100644
--- a/fortran/src/H5Dff_F03.f90
+++ b/fortran/src/H5Dff_F03.f90
@@ -376,7 +376,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -408,7 +408,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -440,7 +440,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -472,7 +472,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -505,7 +505,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -538,7 +538,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -571,7 +571,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -920,7 +920,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -953,7 +953,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -985,7 +985,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1017,7 +1017,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1049,7 +1049,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1081,7 +1081,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1113,7 +1113,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1320,7 +1320,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1352,7 +1352,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1385,7 +1385,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1417,7 +1417,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1450,7 +1450,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1482,7 +1482,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1514,7 +1514,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1872,7 +1872,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1904,7 +1904,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1936,7 +1936,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -1968,7 +1968,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -2000,7 +2000,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -2033,7 +2033,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
@@ -2066,7 +2066,7 @@ CONTAINS
IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
- f_ptr = C_LOC(buf)
+ f_ptr = C_LOC(buf(1,1,1,1,1,1,1))
hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
file_space_id_default, xfer_prp_default, f_ptr)
diff --git a/fortran/src/H5Pff_F03.f90 b/fortran/src/H5Pff_F03.f90
index cd635bc..8fa88e7 100644
--- a/fortran/src/H5Pff_F03.f90
+++ b/fortran/src/H5Pff_F03.f90
@@ -333,7 +333,7 @@ CONTAINS
RETURN
ENDIF
- f_ptr = C_LOC(chr)
+ f_ptr = C_LOC(chr(1)(1:1))
hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
@@ -504,7 +504,7 @@ CONTAINS
chr(i) = value(i:i)
ENDDO
- f_ptr = C_LOC(chr)
+ f_ptr = C_LOC(chr(1)(1:1))
name_len = LEN(name)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
@@ -634,7 +634,7 @@ CONTAINS
hdferr = -1
RETURN
ENDIF
- f_ptr = C_LOC(chr)
+ f_ptr = C_LOC(chr(1)(1:1))
name_len = LEN(name)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
@@ -818,7 +818,7 @@ CONTAINS
chr(i) = value(i:i)
ENDDO
- f_ptr = C_LOC(chr)
+ f_ptr = C_LOC(chr(1)(1:1))
name_len = LEN(name)
hdferr = h5pregister_c(class, name, name_len, size, f_ptr)
@@ -1000,7 +1000,7 @@ CONTAINS
chr(i) = value(i:i)
ENDDO
- f_ptr = C_LOC(chr)
+ f_ptr = C_LOC(chr(1)(1:1))
name_len = LEN(name)
hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index c1dca9d..32cb228 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -465,6 +465,7 @@ SUBROUTINE test_attr_null_space(fcpl, fapl, total_error)
! /* Try to read data from the attribute */
! /* (shouldn't fail, but should leave buffer alone) */
value(1) = 103
+ data_dims(1) = 1
CALL h5aread_f(attr, H5T_NATIVE_INTEGER, value, data_dims, error)
CALL check("h5aread_f",error,total_error)
CALL verify("h5aread_f",value(1),103,total_error)
@@ -2170,7 +2171,6 @@ SUBROUTINE test_attr_dense_open( fcpl, fapl, total_error)
CALL h5aclose_f(attr, error)
CALL check("h5aclose_f",error,total_error)
-
! /* Close dataspace */
CALL h5sclose_f(sid, error)
CALL check("h5sclose_f",error,total_error)