From e57e60cb26ce39d3c4707869a6375ba2e00e2ebc Mon Sep 17 00:00:00 2001 From: jvdelisle Date: Sat, 6 Dec 2008 04:17:31 +0000 Subject: [PATCH] 2008-12-05 Jerry DeLisle PR fortran/38291 * gfortran.dg/streamio_16.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142516 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/streamio_16.f90 | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/streamio_16.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b841930..5b26088 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-12-05 Jerry DeLisle + + PR fortran/38291 + * gfortran.dg/streamio_16.f90: New test. + 2008-12-05 Jakub Jelinek PR c++/35336 diff --git a/gcc/testsuite/gfortran.dg/streamio_16.f90 b/gcc/testsuite/gfortran.dg/streamio_16.f90 new file mode 100644 index 0000000..a415389 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/streamio_16.f90 @@ -0,0 +1,19 @@ +! { dg-do run } +! PR38291 Rejects I/O with POS= if FMT=* +character(15) :: sAccess +character(1) :: instr +integer :: mypos, i +mypos = 0 +open(50, access="stream", form="formatted") +write(50, *, pos=1) "Just something " +do i=1,17 + read( 50, *,pos=i) + inquire(50, access=sAccess, pos=mypos) + if (sAccess.ne."STREAM") call abort + if (mypos.ne.18) call abort +end do +read (50,*, end=10) +call abort + 10 continue +close(50,status="delete") +end -- 2.7.4