]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/25598 (gfortran - Fortran runtime error: Invalid argument)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 6 Jan 2006 01:44:31 +0000 (01:44 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 6 Jan 2006 01:44:31 +0000 (01:44 +0000)
2005-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/25598
* gfortran.dg/backspace_3.f: New test.
* gfortran.dg/backspace_4.f: New test.

From-SVN: r109406

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/backspace_3.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/backspace_4.f [new file with mode: 0644]

index c68573b47b36836c99d0525faf48c090d96b3c05..a1aa997e2c01eb8dc466c58c924d3557ecee15d5 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/25598
+       * gfortran.dg/backspace_3.f: New test.
+       * gfortran.dg/backspace_4.f: New test.
+
 2005-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR fortran/24268
diff --git a/gcc/testsuite/gfortran.dg/backspace_3.f b/gcc/testsuite/gfortran.dg/backspace_3.f
new file mode 100644 (file)
index 0000000..419063b
--- /dev/null
@@ -0,0 +1,20 @@
+! { dg-do run }
+! PR25598 Error on repeated backspaces.
+! Derived from example given in PR by Dale Ranta
+! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org> 
+       integer data
+       data=-1
+       open(unit=11,status='scratch',form='unformatted')
+       write(11)data
+       read(11,end=        1000 )data
+       call abort()
+ 1000  continue
+       backspace 11
+       backspace 11
+       backspace 11
+       read(11,end=        1001 )data
+ 1001  continue
+       if (data.ne.-1) call abort
+       close(11)
+       end
+
diff --git a/gcc/testsuite/gfortran.dg/backspace_4.f b/gcc/testsuite/gfortran.dg/backspace_4.f
new file mode 100644 (file)
index 0000000..69e0f40
--- /dev/null
@@ -0,0 +1,18 @@
+! { dg-do run }
+! PR25598 Error on repeated backspaces.
+! Derived from example given in PR by Dale Ranta
+! Contributed by Jerry DeLisle  <jvdelisle@gcc.gnu.org> 
+       integer data
+       data=-1
+       open(unit=11,status='scratch',form='unformatted')
+       write(11)data
+       read(11,end=        1000 )data
+       call abort()
+ 1000  continue
+       backspace 11
+       backspace 11
+       read(11,end=        1001 )data
+ 1001  continue
+       if (data.ne.-1) call abort
+       close(11)
+       end