From abc79c3a6d295d42b0a9ab48cea07090b0161ee8 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sat, 6 Dec 2008 04:17:31 +0000 Subject: [PATCH] re PR fortran/38291 (Rejects I/O with POS= if FMT=*) 2008-12-05 Jerry DeLisle PR fortran/38291 * gfortran.dg/streamio_16.f90: New test. From-SVN: r142516 --- 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