mirror of git://gcc.gnu.org/git/gcc.git
re PR libfortran/25598 (gfortran - Fortran runtime error: Invalid argument)
2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/25598 * io/file_pos.c (unformatted_backspace): Assure the new file position to seek is not less than zero. (st_backspace): Set unit bytes_left to zero. * io/transfer.c (next_record_r): Fix line lengths, no functional change. From-SVN: r109405
This commit is contained in:
parent
5c1fac1002
commit
9696b2257c
|
|
@ -1,4 +1,17 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
2006-01-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR libgfortran/25598
|
||||||
|
* io/file_pos.c (unformatted_backspace): Assure the new file position
|
||||||
|
to seek is not less than zero.
|
||||||
|
(st_backspace): Set unit bytes_left to zero.
|
||||||
|
* io/transfer.c (next_record_r): Fix line lengths, no functional change.
|
||||||
|
a null value (default). Revert patch of 25419 on 2005-12-28.
|
||||||
|
|
||||||
|
2005-12-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
=======
|
||||||
2006-01-02 Paolo Bonzini <bonzini@gnu.org>
|
2006-01-02 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
>>>>>>> .r109401
|
||||||
|
|
||||||
PR target/25259
|
PR target/25259
|
||||||
* configure.ac: Use GCC_HEADER_STDINT.
|
* configure.ac: Use GCC_HEADER_STDINT.
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,9 @@ unformatted_backspace (st_parameter_filepos *fpp, gfc_unit *u)
|
||||||
else
|
else
|
||||||
reverse_memcpy (&m, p, sizeof (gfc_offset));
|
reverse_memcpy (&m, p, sizeof (gfc_offset));
|
||||||
|
|
||||||
new = file_position (u->s) - m - 2*length;
|
if ((new = file_position (u->s) - m - 2*length) < 0)
|
||||||
|
new = 0;
|
||||||
|
|
||||||
if (sseek (u->s, new) == FAILURE)
|
if (sseek (u->s, new) == FAILURE)
|
||||||
goto io_error;
|
goto io_error;
|
||||||
|
|
||||||
|
|
@ -179,6 +181,7 @@ st_backspace (st_parameter_filepos *fpp)
|
||||||
|
|
||||||
u->endfile = NO_ENDFILE;
|
u->endfile = NO_ENDFILE;
|
||||||
u->current_record = 0;
|
u->current_record = 0;
|
||||||
|
u->bytes_left = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
|
||||||
|
|
@ -1645,8 +1645,10 @@ next_record_r (st_parameter_dt *dtp)
|
||||||
switch (current_mode (dtp))
|
switch (current_mode (dtp))
|
||||||
{
|
{
|
||||||
case UNFORMATTED_SEQUENTIAL:
|
case UNFORMATTED_SEQUENTIAL:
|
||||||
dtp->u.p.current_unit->bytes_left += sizeof (gfc_offset); /* Skip over tail */
|
|
||||||
|
|
||||||
|
/* Skip over tail */
|
||||||
|
dtp->u.p.current_unit->bytes_left += sizeof (gfc_offset);
|
||||||
|
|
||||||
/* Fall through... */
|
/* Fall through... */
|
||||||
|
|
||||||
case FORMATTED_DIRECT:
|
case FORMATTED_DIRECT:
|
||||||
|
|
@ -1656,7 +1658,8 @@ next_record_r (st_parameter_dt *dtp)
|
||||||
|
|
||||||
if (is_seekable (dtp->u.p.current_unit->s))
|
if (is_seekable (dtp->u.p.current_unit->s))
|
||||||
{
|
{
|
||||||
new = file_position (dtp->u.p.current_unit->s) + dtp->u.p.current_unit->bytes_left;
|
new = file_position (dtp->u.p.current_unit->s)
|
||||||
|
+ dtp->u.p.current_unit->bytes_left;
|
||||||
|
|
||||||
/* Direct access files do not generate END conditions,
|
/* Direct access files do not generate END conditions,
|
||||||
only I/O errors. */
|
only I/O errors. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue