re PR libfortran/24112 (Reopening file with STATUS='OLD' doesn't work)

2005-09-30  Janne Blomqvist <jblomqvi@cc.hut.fi>
libgfortran/
PR 24112
* io/open.c (edit_modes): Check for correct flag.
gcc/testsuite/
PR 24112
* gfortran.dg/open_status_1.f90: New.

From-SVN: r104829
This commit is contained in:
Janne Blomqvist 2005-09-30 21:47:54 +03:00 committed by Tobias Schlüter
parent 3f27846b1c
commit 21905d1b43
4 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-09-30 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR 24112
* gfortran.dg/open_status_1.f90: New.
2005-09-30 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/vect/fast-math-vect-reduc-7.c: Clean up temp files.

View File

@ -0,0 +1,8 @@
! { dg-do run }
! Test reopening with io status='old'
program iostatus
open (1, file='foo', status='replace') ! Make sure file exists.
open (1, file='foo', status='old')
open (1, file='foo', status='old')
close (1, status='delete')
end program iostatus

View File

@ -1,3 +1,8 @@
2005-09-30 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR 24112
* io/open.c (edit_modes): Check for correct flag.
2005-09-29 Jakub Jelinek <jakub@redhat.com>
* runtime/string.c (find_option): Change 3rd argument to

View File

@ -120,7 +120,7 @@ edit_modes (gfc_unit * u, unit_flags * flags)
/* Complain about attempts to change the unchangeable. */
if (flags->status != STATUS_UNSPECIFIED &&
u->flags.status != flags->position)
u->flags.status != flags->status)
generate_error (ERROR_BAD_OPTION,
"Cannot change STATUS parameter in OPEN statement");