summaryrefslogtreecommitdiffstats
path: root/hl/fortran/test
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-23 16:31:43 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-23 16:31:43 (GMT)
commit7b056aadff59de5760246d6dff3f5402d0b887bf (patch)
treeffe00af53b177ebf16cbe6f2c8463f2dae5f82d9 /hl/fortran/test
parent7cbf491e29cb9c2cfa3fbbd232f48a51cfaebff4 (diff)
downloadhdf5-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/test')
-rw-r--r--hl/fortran/test/tsttable.F904
1 files changed, 2 insertions, 2 deletions
diff --git a/hl/fortran/test/tsttable.F90 b/hl/fortran/test/tsttable.F90
index bffbb03..3cf8fed 100644
--- a/hl/fortran/test/tsttable.F90
+++ b/hl/fortran/test/tsttable.F90
@@ -561,6 +561,7 @@ SUBROUTINE test_table2()
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(10) ! This should map to REAL*8 on most modern processors
TYPE particle_t
+ SEQUENCE
CHARACTER(LEN=11) :: name
INTEGER(KIND=i8) :: lati
INTEGER(KIND=i16) :: long
@@ -671,11 +672,10 @@ SUBROUTINE test_table2()
f_ptr1 = C_NULL_PTR
f_ptr2 = C_LOC(fill_data(1)%name(1:1))
-
CALL h5tbmake_table_f("Table Title Fill", file_id, table_name_fill, nfields, nrecords, &
dst_size, field_names, dst_offset, field_type, &
chunk_size, f_ptr2, compress, f_ptr1, errcode )
-
+
f_ptr3 = C_LOC(r_data(1)%name(1:1))
CALL h5tbread_table_f(file_id, table_name_fill, nfields, dst_size, dst_offset, dst_sizes, f_ptr3, errcode)