+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
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
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");
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;
+ } */
}