]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/31099 (Runtime error on legal code using RECL)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 10 Mar 2007 00:03:19 +0000 (00:03 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sat, 10 Mar 2007 00:03:19 +0000 (00:03 +0000)
2007-03-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/31099
* gfortran.dg/unformatted_recl.f90: New test.

From-SVN: r122776

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

index 023af848803558b935221871708976d27028b1bb..f9c1c3f72e41425eb19181329fd69dce7e2dd201 100644 (file)
@@ -1,3 +1,8 @@
+2007-03-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/31099
+       * gfortran.dg/unformatted_recl.f90: New test.
+       
 2007-03-09  Roger Sayle  <roger@eyesopen.com>
 
        * gcc.dg/fold-eqcmplx-1.c: New test case.
diff --git a/gcc/testsuite/gfortran.dg/unformatted_recl_1.f90 b/gcc/testsuite/gfortran.dg/unformatted_recl_1.f90
new file mode 100644 (file)
index 0000000..ef1d754
--- /dev/null
@@ -0,0 +1,21 @@
+! { dg-do run } 
+! PR31099 Runtime error on legal code using RECL
+program test
+  integer :: a, b
+  a=1
+  b=2
+  open(10, status="scratch", form="unformatted", recl=8)
+  write(10) a,b
+  write(10) a,b
+  write(10) a,b
+  write(10) b, a
+  rewind(10)
+  b=0
+  a=0
+  read(10) a, b
+  read(10) a, b
+  read(10) a, b
+  read(10) a, b
+  if ((a.ne.2).and.( b.ne.1)) call abort()
+end program test
+