Commit 0948d153 by Janne Blomqvist

Revert previous fix for PR 45723.

libgfortran ChangeLog:

2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/45723
        * io/open.c (new_unit): Don't check file size before attempting
        seek.


testsuite ChangeLog:

2011-11-07  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/45723
        * gfortran.dg/open_dev_null.F90: Remove testcase.

From-SVN: r181085
parent 5ee360d0
2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/45723
* gfortran.dg/open_dev_null.f90: Remove testcase.
2011-11-07 Uros Bizjak <ubizjak@gmail.com> 2011-11-07 Uros Bizjak <ubizjak@gmail.com>
* lib/target-supports.exp (check_effective_target_sync_int_128): * lib/target-supports.exp (check_effective_target_sync_int_128):
......
! { dg-do run }
! PR45723 opening /dev/null for appending writes fails
logical :: thefile
inquire(file="/dev/null",exist=thefile)
if (thefile) then
open(unit=7,file="/dev/null",position="append")
close(7)
endif
end
2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/45723
* io/open.c (new_unit): Don't check file size before attempting
seek.
2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* Makefile.am (AM_CPPFLAGS): Add * Makefile.am (AM_CPPFLAGS): Add
......
...@@ -554,7 +554,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) ...@@ -554,7 +554,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags)
if (flags->position == POSITION_APPEND) if (flags->position == POSITION_APPEND)
{ {
if (file_size (opp->file, opp->file_len) > 0 && sseek (u->s, 0, SEEK_END) < 0) if (sseek (u->s, 0, SEEK_END) < 0)
generate_error (&opp->common, LIBERROR_OS, NULL); generate_error (&opp->common, LIBERROR_OS, NULL);
u->endfile = AT_ENDFILE; u->endfile = AT_ENDFILE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment