]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/34560 (I/O internal read: END expected, but no failure)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 26 Dec 2007 03:41:06 +0000 (03:41 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 26 Dec 2007 03:41:06 +0000 (03:41 +0000)
2007-12-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libfortran/34560
* gfortran.dg/read_eof_5.f90: New test.

From-SVN: r131178

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

index 069733d071299578f6b56a8aaedcbaad22fc44bc..2374f35d8e298a65ea14684090147b8afa5d6a03 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/34560
+       * gfortran.dg/read_eof_5.f90: New test.
+
 2007-12-25  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/34514
diff --git a/gcc/testsuite/gfortran.dg/read_eof_5.f90 b/gcc/testsuite/gfortran.dg/read_eof_5.f90
new file mode 100644 (file)
index 0000000..3c606a0
--- /dev/null
@@ -0,0 +1,12 @@
+! { dg-do run }
+! PR34560 I/O internal read: END expected, but no failure
+program main
+  character(len=2) :: line
+  character(len=1) :: a(3)
+  a = "x"
+  line = 'ab'
+  read (line,'(A)',END=99) a
+  call abort
+  99 continue 
+  if (any(a /= ['a','x','x'])) call abort
+end program main