diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2011-10-31 16:59:19 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2011-10-31 16:59:19 +0200 |
commit | 08810e5257936014e242527cdbb2de6beddf24e8 (patch) | |
tree | 41e75a36bf344be0552dbdadfdb4a498e01f5710 /gcc | |
parent | 3469bd8660b6c79a4727287ef4214d2b9c864ba6 (diff) | |
download | gcc-08810e5257936014e242527cdbb2de6beddf24e8.zip gcc-08810e5257936014e242527cdbb2de6beddf24e8.tar.gz gcc-08810e5257936014e242527cdbb2de6beddf24e8.tar.bz2 |
Update file position for inquire lazily.
libgfortran ChangeLog:
2011-10-31 Janne Blomqvist <jb@gcc.gnu.org>
* io/inquire.c (inquire_via_unit): Check whether we're at the
beginning or end if the position is unspecified. If the position
is not one of the 3 standard ones, return unspecified.
* io/io.h (update_position): Remove prototype.
* io/transfer.c (next_record): Set the position to unspecified,
letting inquire figure it out more exactly when needed.
* io/unit.c (update_position): Remove function.
testsuite ChangeLog:
2011-10-31 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.dg/inquire_5.f90: Update testcase to match the standard
and current implementation.
From-SVN: r180703
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/inquire_5.f90 | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a432ab8..c3a1f0f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-10-31 Janne Blomqvist <jb@gcc.gnu.org> + + * gfortran.dg/inquire_5.f90: Update testcase to match the standard + and current implementation. + 2011-10-31 Paul Brook <paul@codesourcery.com> * gcc.dg/constructor-1.c: New test. diff --git a/gcc/testsuite/gfortran.dg/inquire_5.f90 b/gcc/testsuite/gfortran.dg/inquire_5.f90 index fe107a1..2be3a34 100644 --- a/gcc/testsuite/gfortran.dg/inquire_5.f90 +++ b/gcc/testsuite/gfortran.dg/inquire_5.f90 @@ -1,11 +1,10 @@ ! { dg-do run { target fd_truncate } } -! { dg-options "-std=legacy" } ! ! pr19314 inquire(..position=..) segfaults ! test by Thomas.Koenig@online.de ! bdavis9659@comcast.net implicit none - character*20 chr + character(len=20) chr open(7,STATUS='SCRATCH') inquire(7,position=chr) if (chr.NE.'ASIS') CALL ABORT @@ -31,7 +30,7 @@ write(7,*)'this is another record' backspace(7) inquire(7,position=chr) - if (chr.NE.'ASIS') CALL ABORT + if (chr .NE. 'UNSPECIFIED') CALL ABORT rewind(7) inquire(7,position=chr) if (chr.NE.'REWIND') CALL ABORT |