diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-09 03:19:09 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-09 03:19:09 +0000 |
commit | 504951d5856a7795aa618bce5a3d6d726dd781bb (patch) | |
tree | e32337bd8289abcab39c735bd695f185dbbd4737 /libgfortran | |
parent | a2fbe7be7bd5a73a0fd152d8dcdc4eda71afe0f9 (diff) | |
download | gcc-504951d5856a7795aa618bce5a3d6d726dd781bb.tar.gz |
2008-12-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/38430
* io/transfer.c (data_transfer_init): Move constraint check for REC=
and STREAM access into condition for other REC= constraints to simplify.
Comment out this constraint to avoid breaking compatibility with 4.3
until later. Added a TODO for above comment and this one.
Fix test for max pos.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142575 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 9 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 25 |
2 files changed, 22 insertions, 12 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 765bbd78b3e..dcc4867882e 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2008-12-08 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/38430 + * io/transfer.c (data_transfer_init): Move constraint check for REC= + and STREAM access into condition for other REC= constraints to simplify. + Comment out this constraint to avoid breaking compatibility with 4.3 + until later. Added a TODO for above comment and this one. + Fix test for max pos. + 2008-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/38291 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 318d2215ee2..ea63a0daffc 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1986,15 +1986,6 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) return; } - if (dtp->u.p.current_unit->flags.access == ACCESS_STREAM - && (cf & IOPARM_DT_HAS_REC) != 0) - { - generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, - "Record number not allowed for stream access " - "data transfer"); - return; - } - /* Process the ADVANCE option. */ dtp->u.p.advance_status @@ -2141,7 +2132,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) return; } - if (dtp->rec >= dtp->u.p.current_unit->maxrec) + if (dtp->pos >= dtp->u.p.current_unit->maxrec) { generate_error (&dtp->common, LIBERROR_BAD_OPTION, "POS=specifier too large"); @@ -2231,10 +2222,20 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) return; } - /* This is required to maintain compatibility between - 4.3 and 4.4 runtime. */ + /* TODO: This is required to maintain compatibility between + 4.3 and 4.4 runtime. Remove when ABI changes from 4.3 */ + if (is_stream_io (dtp)) dtp->u.p.current_unit->strm_pos = dtp->rec; + + /* TODO: Un-comment this code when ABI changes from 4.3. + if (dtp->u.p.current_unit->flags.access == ACCESS_STREAM) + { + generate_error (&dtp->common, LIBERROR_OPTION_CONFLICT, + "Record number not allowed for stream access " + "data transfer"); + return; + } */ } |