diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2016-09-23 16:31:43 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2016-09-23 16:31:43 (GMT) |
commit | 7b056aadff59de5760246d6dff3f5402d0b887bf (patch) | |
tree | ffe00af53b177ebf16cbe6f2c8463f2dae5f82d9 /hl/fortran/src | |
parent | 7cbf491e29cb9c2cfa3fbbd232f48a51cfaebff4 (diff) | |
download | hdf5-7b056aadff59de5760246d6dff3f5402d0b887bf.zip hdf5-7b056aadff59de5760246d6dff3f5402d0b887bf.tar.gz hdf5-7b056aadff59de5760246d6dff3f5402d0b887bf.tar.bz2 |
Added SEQUENCE to derived types for NAG:
Section 81 of the compiler manual, e.g. at
http://www.nag.co.uk/nagware/np/r61_doc/np61_manual.pdf
covers details about the compiler's internal representations, including
"
Fortran derived types are translated into C structs.
If BIND(C) or SEQUENCE is used, the order of the items within
the struct is the same as the order within the derived type definition.
Otherwise, the order of items is permuted to
put larger types at the front of the struct so as to improve alignment
and reduce storage; the C output code can be
inspected to determine the ordering used.
"
Removed INTENT(IN) to fix segfaults in C APIs for TYPE(C_PTR).
Tested: NAG (gnu)
Diffstat (limited to 'hl/fortran/src')
-rw-r--r-- | hl/fortran/src/H5TBff.F90 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index a31c751..5d1ee35 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -376,7 +376,8 @@ CONTAINS INTEGER(size_t), INTENT(in) :: dst_size ! The size of the structure type INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_offset ! An array containing the offsets of the fields INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_sizes ! An array containing the sizes of the fields - TYPE(C_PTR), INTENT(OUT) :: dst_buf ! Buffer with data + TYPE(C_PTR) :: dst_buf ! Buffer with data !! do not use INTENT, causes NAG + ! to segfault in C APIs INTEGER :: errcode ! error code INTEGER(size_t) :: namelen ! name length |