re PR fortran/38291 (Rejects I/O with POS= if FMT=*)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 6 Dec 2008 04:17:31 +0000 (04:17 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 6 Dec 2008 04:17:31 +0000 (04:17 +0000)
2008-12-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/38291
* gfortran.dg/streamio_16.f90: New test.

From-SVN: r142516

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/streamio_16.f90 [new file with mode: 0644]

index b841930c2c6c1350ccfae28254ba095a731e2395..5b26088dd13ee3288bfd916bf13ed9fa9533f755 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/38291
+       * gfortran.dg/streamio_16.f90: New test.
+
 2008-12-05  Jakub Jelinek  <jakub@redhat.com>
 
        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 (file)
index 0000000..a415389
--- /dev/null
@@ -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