[patch, libgfortran] PR24224 Generalized internal array IO not implemented.
Jerry DeLisle
jvdelisle@verizon.net
Mon Oct 24 09:13:00 GMT 2005
Attached patch is updated for Pauls comments. The patch does not yet implement
negative strides for array IO. Some cleanups of comments are included. Two new
functions are added giving better factoring. Incrementing through the
array_loop_spec is in one function used for both read and write. Test cases are
attached.
Bootstrapped and regression tested. NIST tested. OK for mainline?
Do we want this back ported to 4.0?
If so, I will have to back port at least one other patch done a while back by
others as well as Paul Thomas patch to trans-io.c that provides the array
descriptor needed.
2005-10-24 Jerry DeLisle <jvdelisle@verizon.net>
PR libgfortran/24224
* libgfortran.h: Remove array stride error code.
* runtime/error.c: Remove array stride error.
* io/io.h: Change name of 'nml_loop_spec' to 'array_loop_spec' to be
generic. Add pointer to array_loop_spec and rank to gfc_unit
structure.
* io/list_read.c: Revise nml_loop_spec references to array_loop_spec.
* io/transfer.c (init_loop_spec): New function to initialize
an array_loop_spec.
(next_array_record): New function to return the index to the next array
record by incrementing through the array_loop_spec.
(next_record_r): Use new function.
(next_record_w): Use new function.
(finalize_transfer): Free memory allocated for array_loop_spec.
* io/unit.c (get_array_unit_len): Delete this function. Use new
function init_loop_spec to initialize the array_loop_spec.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr24224.diff
Type: text/x-patch
Size: 15622 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051024/2f6a443a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_4.f90
Type: application/x-extension-f90
Size: 660 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051024/2f6a443a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_6.f90
Type: application/x-extension-f90
Size: 1118 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051024/2f6a443a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_7.f90
Type: application/x-extension-f90
Size: 549 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051024/2f6a443a/attachment-0003.bin>
More information about the Fortran
mailing list