diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/open_status_1.f90 | 8 | ||||
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/io/open.c | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 97ac0baeb15..65f59579100 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/gfortran.dg/open_status_1.f90 b/gcc/testsuite/gfortran.dg/open_status_1.f90 new file mode 100644 index 00000000000..df44a4461a8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/open_status_1.f90 @@ -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 diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index fa76b5ef039..07b2e913c7c 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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 diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 82d5a355e0d..e1e42ad9370 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -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"); |