diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-07 14:32:50 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-07 14:32:50 +0000 |
commit | 03c0d965a821084f7bee5be4ad2277475ff0da42 (patch) | |
tree | c2d2060f3b278362f912a3e99c0c4953c729ea01 /libgfortran | |
parent | da22c41abba8c6d2fddbe78b50f2343f9f1cc79c (diff) | |
download | gcc-03c0d965a821084f7bee5be4ad2277475ff0da42.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181085 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/open.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 264f196d9df..82538422db4 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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> * Makefile.am (AM_CPPFLAGS): Add diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 0102b9cf99f..8f969edb5e1 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -554,7 +554,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) 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); u->endfile = AT_ENDFILE; } |